Canopy
1.0
The header-only random forests library
|
A simple parameter generator functor for training forest models. More...
#include <defaultParameterGenerator.hpp>
Public Member Functions | |
defaultParameterGenerator (const int limit) | |
Constructor where one limit is applied to all parameters. More... | |
defaultParameterGenerator (const std::array< int, TNumParams > &limits) | |
Constructor where different limits are used for each parameter. More... | |
void | operator() (std::array< int, TNumParams > ¶ms) |
Function to generate random parameter combinations. More... | |
A simple parameter generator functor for training forest models.
Generates random combinations of parameters where all parameters are drawn independently from a uniform distribution between zero and some user-specified upper limit.
TNumParams | The number of parameters. This must match the corresponding template parameter of the forest model. |
|
inline |
Constructor where one limit is applied to all parameters.
limit | The upper limit for all variables. All parameter values are generated from a uniform distribution over the integers between 0 and limit inclusive. |
|
inline |
Constructor where different limits are used for each parameter.
limits | Array of upper limits. The upper limit for all variables. All parameter values for parameter with index p are generated from a uniform distribution over the integers between 0 and limits[p] inclusive. |
|
inline |
Function to generate random parameter combinations.
This is called automatically by the randomForestBase::train() method.