mlpack  3.0.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
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

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: