LECA API

Data Preparation

LECA.prep.arrhenius(data, feature_list[, ...])

Transform objective function into Arrhenius fitted surrogate model (\(log(\sigma) \rightarrow S_0, S_1, S_2\)).

LECA.prep.combine_cut(data, objective_funcs, ...)

Takes the mean value of the given objective functions for measurements where every declared feature is identical and also records the standard deviations.

LECA.prep.data_visualize(df, features, show_axes)

Visualize dataset with a 2d or 3d plot.

LECA.prep.direct_sample_arrhenius(data, ...)

Transform objective function into Arrhenius fitted surrogate model (\(log(\sigma) \rightarrow S_0, S_1, S_2\)).

LECA.prep.feature_overview(data, ...[, ...])

Outputs correlation/covariance plots for features along with feature importance plots for each objective function (uses sklearn.ensemble.RandomForestRegressor with default hyperparameters)

LECA.prep.filter_fn(data, cols, func)

Applies the provided function to each value in the given column(s).

LECA.prep.import_data([json_directories, ...])

Function for importing json data following the BIG-MAP json formatting standard.

LECA.prep.interactive_data_visualize(df, ...)

Visualize dataset with a 2d or 3d plot.

LECA.prep.outlier_filter(data, ...[, ...])

Data outlier detection using HDBSCAN clustering algorithm.

Regression WorkFlow

LECA.fit.WorkFlow(data, features, objective_list)

Fundamental object for training/optimizing LECA regression models, tracking their performance via cross-validation and bootstrapping datasets for error-estimation.

Model Analysis

LECA.analyze.comparative_datasize_performance(wf)

Comparative model performance as a function of N_training size.

LECA.analyze.datasize_performance(wf, ...[, ...])

1/N_training performance metrics.

LECA.analyze.performance_plot(wf[, metric])

Generate plot showing time/MAE/MSE/R2 scores of all trained models on training and test data, sorted by metric.

LECA.analyze.create_input(feature_dict[, ...])

Create a dataframe grid of input electrolyte compositions from sparse feature vectors, or [min, max] + step values.

LECA.analyze.predict_conductivity_from_arrhenius_objectives(...)

Predict the ionic conductivity for given electrolyte compositions at a given temperature.

LECA.analyze.predict_conductivity_from_log_conductivity_objective(...)

Predict the ionic conductivity for given electrolyte compositions at a given temperature.

LECA.analyze.plot_1D(wfs, models, ...[, ...])

1-dimensional slice along one feature for models predicted conductivity / log(conductivity).

LECA.analyze.plot_1D_Sx(wfs, models, ...[, ...])

1-dimensional slice along one feature for models predicted arrhenius objectives S0, S1 and S2.

LECA.analyze.plot_2D(wf, model, ...[, ...])

2-dimensional slice along two features for predicted conductivity / log(conductivity).

LECA.analyze.plot_2D_Sx(wf, model, feature_dict)

2-dimensional slice along two features for predicted Arrhenius objective values (typically S0, S1 and S2).

LECA.analyze.predict_arrhenius_fit(x, beta_0)

Predict the arrhenius fit from a pandas Series for a single data point.

LECA.analyze.visualize_arrhenius_fit(...[, ...])

Can be used to visualize arrhenius fit or predicted arrhenius fits.

LECA.analyze.extract_results(wf)

Extract the results stored in a workflow.

LECA Custom Estimators

LECA.estimators.PolynomialRegression([...])

Estimator Object which accepts polynomial feature inputs and selects specified polynomial features to use for fitting.

LECA.estimators.AlphaGPR([kernel, ...])

Estimator Object which takes a dataframe of the measured objective function and measurement error, and sets the alpha based on the measurement error.

Notebook Utils