autoBOTLib.learning package¶
Submodules¶
autoBOTLib.learning.hyperparameter_configurations module¶
autoBOTLib.learning.scikit_based module¶
-
autoBOTLib.learning.scikit_based.
scikit_learners
(final_run, tmp_feature_space, train_targets, learner_hyperparameters, learner_preset, learner, task, scoring_metric, n_fold_cv, validation_percentage, random_seed, verbose, validation_type, num_cpu)¶ An auxilliary method which conducts sklearn-based learning
autoBOTLib.learning.torch_sparse_nn module¶
-
class
autoBOTLib.learning.torch_sparse_nn.
E2EDatasetLoader
(features, targets=None)¶ Bases:
Generic
[torch.utils.data.dataset.T_co
]A generic toch dataframe loader adapted for sparse (CSR) matrices.
-
__init__
(features, targets=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
autoBOTLib.learning.torch_sparse_nn.
to_one_hot
(lbx)¶
-
class
autoBOTLib.learning.torch_sparse_nn.
HyperParamNeuralObject
(hyperparam_space, verbose=0, device='cpu', metric='f1_macro')¶ Bases:
object
Meta learning object governing hyperparameter optimization
-
__init__
(hyperparam_space, verbose=0, device='cpu', metric='f1_macro')¶ Initialize self. See help(type(self)) for accurate signature.
-
fit
(X, Y, refit=False, n_configs=1)¶ A generic fit method, resembling GridSearchCV
-
-
class
autoBOTLib.learning.torch_sparse_nn.
GenericFFNN
(input_size, num_classes, hidden_layer_size, num_hidden=2, dropout=0.02, device='cuda')¶ Bases:
torch.nn.modules.module.Module
-
__init__
(input_size, num_classes, hidden_layer_size, num_hidden=2, dropout=0.02, device='cuda')¶ Initializes internal Module state, shared by both nn.Module and ScriptModule.
-
hadamard_act
(x)¶
-
forward
(x)¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
get_importances
()¶
-
training
: bool¶
-
-
class
autoBOTLib.learning.torch_sparse_nn.
SFNN
(batch_size=32, num_epochs=32, learning_rate=0.001, stopping_crit=10, hidden_layer_size=64, dropout=0.2, num_hidden=2, device='cpu', verbose=0, *args, **kwargs)¶ Bases:
object
-
__init__
(batch_size=32, num_epochs=32, learning_rate=0.001, stopping_crit=10, hidden_layer_size=64, dropout=0.2, num_hidden=2, device='cpu', verbose=0, *args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
fit
(features, labels)¶
-
predict
(features, return_proba=False)¶
-
get_importances
(features)¶
-
predict_proba
(features)¶
-
-
autoBOTLib.learning.torch_sparse_nn.
cross_val_score_nn
(config, X, Y, metric='f1_macro')¶ A method which performs cross-validation and returns top score
-
autoBOTLib.learning.torch_sparse_nn.
get_random_config
(cdict)¶ Select a random hyperparam configuration
-
autoBOTLib.learning.torch_sparse_nn.
hyper_opt_neural
(X, Y, refit=True, verbose=1, device='cpu', learner_preset='default', metric='f1_macro')¶ Generic hyperoptimization routine
-
autoBOTLib.learning.torch_sparse_nn.
torch_learners
(final_run, X, Y, custom_hyperparameters, learner_preset, learner, task, metric, num_folds, validation_percentage, random_seed, verbose, validation_type, num_cpu, device='cpu')¶ A method for searching the architecture space