The physlearn.supervised.utils._estimator_checks module provides
basic utilities for automated estimator checking.
Chooses the candidate string that minimizes the edit distance.
init_choice (str) – Specify the initial choice as a string, e.g., the Scikit-Learn class Ridge as ‘ridge’, ‘Ridge’, ‘RIDGE’, etc.
candidate_choices (list) – A list of candidate choices, where each candidate is a string.
out_choice
str
Notes
The edit distance between the initial choice and each possible choice corresponds to the Levenshtein distance, which uses the operations of insertion, removal, or substitution to count the distance.
Chooses the candidate estimator that minimizes the edit distance.
estimator_choice (str) – Specify the estimator choice as a string, e.g., the Scikit-Learn class Ridge as ‘ridge’, ‘Ridge’, ‘RIDGE’, etc.
estimator_type (str) – Specify the supervised learning task, e.g., regression.
estimator_choices (list or None, optional (default=None)) – A list of estimator choices, where each estimator is a string.
estimator_choice
str
Chooses the the first and second stacking layer estimators.
stacking_layer (dict) – Specify the estimator(s) in the first stacking layer, and the final estimator in the second stacking layer.
estimator_type (str) – Specify the supervised learning task, e.g., regression.
stacking_layer
dict
Checks the line search computation options for base boosting.
init_guess (int, float, or ndarray) – The initial guess for the expansion coefficient.
opt_method (str) – Choice of optimization method. If 'minimize', then
scipy.optimize.minimize, else if 'basinhopping',
then scipy.optimize.basinhopping.
method (str or None) – The type of solver utilized in the optimization method.
tol (float or None) – The epsilon tolerance for terminating the optimization method.
options (dict or None) – A dictionary of solver options.
niter (int or None) – The number of iterations in basin-hopping.
T (float or None) – The temperature paramter utilized in basin-hopping, which determines the accept or reject criterion.
loss (str) – The loss function utilized in the line search computation, where ‘ls’ denotes the squared error loss function, ‘lad’ denotes the absolute error loss function, ‘huber’ denotes the Huber loss function, and ‘quantile’ denotes the quantile loss function.
regularization (int or float) – The regularization strength in the line search computation.
Checks if the Bayesian optimization utility changed the (hyper)parameter type.
pbounds (dict) – A dictionary, wherein the keys are the (hyper)parameter names and the values are the (hyper)parameter values.
pbounds
dict
Notes
During the sequential Bayesian optimization, the utility occasionally sets the value of a (hyper)parameter with type int to a value with type float.
Preprocesses the (hyper)parameters.
The preprocessing is determined by the regression task, and the assumption on the single-targets, if the task is multi-target regression.
raw_params (dict) – The user provided (hyper)parameters.
multi_target (bool) – Distinguishes between single-target and multi-target regression. If True, then the expected task is multi-target regression.
chain (bool) – Distinguishes between independent single-target regression subtasks and chaining. If true, then the expected multi-target combination is chaining.
out_params
dict
Chooses the (hyper)parameter search method that minimizes the edit distance.
search_method (str) – Specifies the Scikit-learn or Bayesian optimization (hyper)parameter search method.
search_method
str