Python API¶
Database¶
-
rrgp.database.
transform_to_text_labels
(labels)[source]¶ Transform numerical labels to corresponding text
- Parameters
labels (array) – an array of numerical labels
- Returns
labels – same array with corresponding text labels
- Return type
array
-
rrgp.database.
get_dataset_split
(data_path, labels_path)[source]¶ Get data and ground-truth of selected split
-
rrgp.database.
load
(standardized=False, printSize=False, train_data_path=None, train_labels_path=None, test_data_path=None, test_labels_path=None)[source]¶ Get the dataset and the corresponding labels split into a training and a testing set
- Parameters
standardized (bool) – standardize the data before returning them or not
- Returns
train_data (array)
train_labels (array)
test_data (array)
test_labels (array)
Pre-processor¶
-
rrgp.preprocessor.
standardize
(train_data, test_data)[source]¶ Standardize training and testing data
- Parameters
train_data (array) – Data on which to calculate the standardization parameters. The standardization is also applied on this subset.
test_data (array) – Test subset on which to apply the standardization.
- Returns
train_data (array) – Standardized training data
test_data (array) – Standardized testing data
Machine Learning Algorithm¶
Analysis¶
-
rrgp.evaluator.
get_metrics_table
(predictions, test_labels)[source]¶ Generate a metrics table to evaluate predictions
- Parameters
predictions (array) – Predictions of a model
test_labels (array) – Corresponding ground-truth
- Returns
table – Nicely formatted plain-text table with the computed metrics
- Return type
string