mechanoChemML.src.kfold_train¶
Module Contents¶
Classes¶
MLKFold |
this class is created to speed up the k-fold training process |
-
class
mechanoChemML.src.kfold_train.MLKFold(total_folds, dataset, split_ratio=[0.8, 0.1, 0.1])[source]¶ this class is created to speed up the k-fold training process by default, after an initial shuffle, 10% data will be saved for testing the 90% dataset will be used for k-fold train to train the best NN structure, 90% dataset will be split as 80%, 10% for train and validation the held 10% testing dataset will be used for final model evaluation
-
get_next_fold(self, dataset, labels, derivative=[], fold_id=-1, final_data=False)[source]¶ get next fold data for training/validation
- input: features, labels, fold_id
- fold_id is only used when a specific number is given
output: current fold of features and labels
-