mlpack  git-master
GridSearch Class Reference

An optimizer that finds the minimum of a given function by iterating through points on a multidimensional grid. More...

Public Member Functions

template
<
typename
FunctionType
>
double Optimize (FunctionType &function, arma::mat &bestParameters, data::DatasetMapper< data::IncrementPolicy, double > &datasetInfo)
 Optimize (minimize) the given function by iterating through the all possible combinations of values for the parameters specified in datasetInfo. More...

 

Detailed Description

An optimizer that finds the minimum of a given function by iterating through points on a multidimensional grid.

For GridSearch to work, a FunctionType template parameter is required. This class must implement the following function:

double Evaluate(const arma::mat& coordinates);

Definition at line 29 of file grid_search.hpp.

Member Function Documentation

◆ Optimize()

double Optimize ( FunctionType &  function,
arma::mat &  bestParameters,
data::DatasetMapper< data::IncrementPolicy, double > &  datasetInfo 
)

Optimize (minimize) the given function by iterating through the all possible combinations of values for the parameters specified in datasetInfo.

Parameters
functionFunction to optimize.
bestParametersVariable for storing results.
datasetInfoType information for each dimension of the dataset. It should store possible values for each parameter.
Returns
Objective value of the final point.

The documentation for this class was generated from the following file: