The class HyperParameterTuner for the given MLAlgorithm utilizes the provided Optimizer to find the values of hyperparameters that optimize the value of the given Metric. More...
Public Member Functions  
template  
HyperParameterTuner (const CVArgs &...args)  
Create a HyperParameterTuner object by passing constructor arguments for the given crossvalidation strategy (the CV class). More...  
const MLAlgorithm &  BestModel () const 
Get the best model from the last run. More...  
MLAlgorithm &  BestModel () 
Modify the best model from the last run. More...  
double  BestObjective () const 
Get the performance measurement of the best model from the last run. More...  
double  MinDelta () const 
Get minimum increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization. More...  
double &  MinDelta () 
Modify minimum increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization. More...  
template  
TupleOfHyperParameters< Args... >  Optimize (const Args &... args) 
Find the best hyperparameters by using the given Optimizer. More...  
OptimizerType &  Optimizer () 
Access and modify the optimizer. More...  
double  RelativeDelta () const 
Get relative increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization. More...  
double &  RelativeDelta () 
Modify relative increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization. More...  
The class HyperParameterTuner for the given MLAlgorithm utilizes the provided Optimizer to find the values of hyperparameters that optimize the value of the given Metric.
The value of the Metric is calculated by performing crossvalidation with the provided crossvalidation strategy.
To construct a HyperParameterTuner object you need to pass the same arguments as for construction of an object of the given CV class. For example, we can use the following code to try to find a good lambda value for LinearRegression.
When some hyperparameters should not be optimized, you can specify values for them with the Fixed function as in the following example of finding good lambda1 and lambda2 values for LARS.
MLAlgorithm  A machine learning algorithm. 
Metric  A metric to assess the quality of a trained model. 
CV  A crossvalidation strategy used to assess a set of hyperparameters. 
OptimizerType  An optimization strategy (GridSearch and GradientDescent are supported). 
MatType  The type of data. 
PredictionsType  The type of predictions (should be passed when the predictions type is a template parameter in Train methods of the given MLAlgorithm; arma::Row 
WeightsType  The type of weights (should be passed when weighted learning is supported, and the weights type is a template parameter in Train methods of the given MLAlgorithm; arma::vec will be used otherwise). 
HyperParameterTuner  (  const CVArgs &...  args  ) 
Create a HyperParameterTuner object by passing constructor arguments for the given crossvalidation strategy (the CV class).
args  Constructor arguments for the given crossvalidation strategy (the CV class). 

inline 

inline 

inline 

inline 
Get minimum increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization.
This value is going to be used when it is greater than the increase calculated with the rules described in the documentation for RelativeDelta().
The default value is 1e10.

inline 
Modify minimum increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization.
This value is going to be used when it is greater than the increase calculated with the rules described in the documentation for RelativeDelta().
The default value is 1e10.
TupleOfHyperParameters 
(  const Args &...  args  ) 
Find the best hyperparameters by using the given Optimizer.
For each hyperparameter one of the following should be passed as an argument.
All arguments should be passed in the same order as if the corresponding hyperparameters would be passed into the Evaluate method of the given CV class (in the order as they appear in the constructor(s) of the given MLAlgorithm). Also, arguments for all required hyperparameters (ones that don't have default values in the corresponding MLAlgorithm constructor) should be provided.
The method returns a tuple of values for hyperparameters that haven't been fixed.
args  Arguments corresponding to hyperparameters (see the method description for more information). 
Referenced by HyperParameterTuner< MLAlgorithm, Metric, CV, OptimizerType, MatType, PredictionsType, WeightsType >::MinDelta().

inline 

inline 
Get relative increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization.
The exact increase for some particular argument is equal to the absolute value of the argument multiplied by the relative increase (see also the documentation for MinDelta()).
The default value is 0.01.

inline 
Modify relative increase of arguments for calculation of partial derivatives (by the definition) in gradientbased optimization.
The exact increase for some particular argument is equal to the absolute value of the argument multiplied by the relative increase (see also the documentation for MinDelta()).
The default value is 0.01.