hyper_opt_naswot
Hyperparameter optimizer working without training.
- class HyperOptNASWOT(params: Parameters, data=None, use_pkl_checkpoints=False)[source]
Bases:
HyperOpt
Hyperparameter optimizer that does not require training networks.
Networks are analysed using the Jacobian.
- Parameters:
params (mala.common.parametes.Parameters) – Parameters used to create this hyperparameter optimizer.
data (mala.datahandling.data_handler.DataHandler) – DataHandler holding the data for the hyperparameter optimization.
- perform_study(trial_list=None)[source]
Perform the study, i.e. the optimization.
This is done by sampling a certain subset of network architectures. Currently it is mandatory to provide a trial_list, although it will be optional later on.
- Parameters:
trial_list (list) – A list containing trials from either HyperOptOptuna or HyperOptOAT.
- Returns:
best_trial_loss – Loss of the best trial.
- Return type:
float
- set_optimal_parameters()[source]
Set the optimal parameters found in the present study.
The parameters will be written to the parameter object with which the hyperparameter optimizer was created.
- property best_trial
Get the best trial determined in this NASWOT run.
This property is read only, and will be recomputed.
- property best_trial_index
Get the index and loss of best trial determined in this NASWOT run.
This property is read only, and will be recomputed.
- Returns:
best_trial_index – A list containing [0] the best trial index and [1] the best trial loss.
- Return type:
list