chemicalchecker.tool.targetmate.base.Model
- class Model(is_classifier, **kwargs)[source]
Bases:
ModelSetup
Generic model class
Initialize TargetMate model.
- Parameters:
is_classifier (bool) – Is the model a classifier or a regressor?
Methods
array_on_disk
check_array_from_disk
Store model in compressed format for persistance
cpu_count
create_models_path
directory_tree
explain
Select a pipeline, for example, using HyperOpt.
fit
Execute the any method on the configured HPC.
Load previously stored TargetMate instance.
Load base model
Load a base model
load_data
Calculate metric.
model_iterator
predict
prepare_data
prepare_for_ml
read_data
Redefine path of a TargetMate instance.
Redefine path of a TargetMate instance.
repath_predictions_by_fold_and_set
Redefine path of a TargetMate instance.
reset_path_bases
Reset predictions path
sampler
Save TargetMate instance
save_data
Wait for jobs to finish
Delete temporary data
- compress_models()
Store model in compressed format for persistance
- find_base_mod(X, y, smiles, destination_dir)[source]
Select a pipeline, for example, using HyperOpt.
- func_hpc(func_name, *args, **kwargs)
Execute the any method on the configured HPC.
- Parameters:
args (tuple) – the arguments for of the function method
kwargs (dict) – arguments for the HPC method.
- static load(models_path)
Load previously stored TargetMate instance.
- load_base_model(destination_dir, append_pipe=False)
Load a base model
- repath_bases_by_fold(fold_number, is_tmp=True, reset=True, only_train=False)
Redefine path of a TargetMate instance. Used by the Validation class.
- repath_predictions_by_fold(fold_number, is_tmp=True, reset=True)
Redefine path of a TargetMate instance. Used by the Validation class.
- repath_predictions_by_set(is_train, is_tmp=True, reset=True)
Redefine path of a TargetMate instance. Used by the Validation class.
- reset_path_predictions(is_tmp=True)
Reset predictions path
- save()
Save TargetMate instance
- waiter(jobs, secs=3)
Wait for jobs to finish
- wipe()
Delete temporary data