jarvis.ai.pkgs.utils

Helper functions for ML applications.

Module Contents

Functions

get_ml_data([ml_property, dataset, data_ranges])

Provide arrays/pandas-dataframe as input for ML algorithms.

mean_absolute_deviation(data[, axis])

Get Mean absolute deviation.

regr_scores(test, pred)

Provide generic regresion scores.

binary_class_dat([X, Y, tol])

Categorize a continous dataset in 1/0 with a threshold "tol".

Attributes

typical_data_ranges

jarvis.ai.pkgs.utils.typical_data_ranges
jarvis.ai.pkgs.utils.get_ml_data(ml_property='formation_energy_peratom', dataset='cfid_3d', data_ranges=typical_data_ranges)[source]

Provide arrays/pandas-dataframe as input for ML algorithms.

Args:

ml_property: target property to train

data_ranges: range for filtering data

dataset: dataset available in jarvis or other array

Returns:

X, Y , ids

jarvis.ai.pkgs.utils.mean_absolute_deviation(data, axis=None)[source]

Get Mean absolute deviation.

jarvis.ai.pkgs.utils.regr_scores(test, pred)[source]

Provide generic regresion scores.

Args:

pred: predicted values

test: held data for testing

Returns:

info: with metrics

jarvis.ai.pkgs.utils.binary_class_dat(X=[], Y=[], tol=0.1)[source]

Categorize a continous dataset in 1/0 with a threshold “tol”.

TODO: replace with OneHotEncoder