mlpack  git-master
RandomSelection Class Reference

Public Member Functions

 RandomSelection (const double fraction=0.3)
 Constructor for the random selection strategy. More...

 
double Fraction () const
 Get the dataset fraction. More...

 
double & Fraction ()
 Modify the dataset fraction. More...

 
template
<
typename
DecomposableFunctionType
>
double Select (DecomposableFunctionType &function, const size_t batchSize, const arma::mat &iterate)
 Randomly select dataset points to calculate the objective function. More...

 

Detailed Description

Definition at line 23 of file random_selection.hpp.

Constructor & Destructor Documentation

◆ RandomSelection()

RandomSelection ( const double  fraction = 0.3)
inline

Constructor for the random selection strategy.

Parameters
fractionThe dataset fraction used for the selection (Default 0.3).

Definition at line 31 of file random_selection.hpp.

Member Function Documentation

◆ Fraction() [1/2]

double Fraction ( ) const
inline

Get the dataset fraction.

Definition at line 37 of file random_selection.hpp.

◆ Fraction() [2/2]

double& Fraction ( )
inline

Modify the dataset fraction.

Definition at line 39 of file random_selection.hpp.

◆ Select()

double Select ( DecomposableFunctionType &  function,
const size_t  batchSize,
const arma::mat &  iterate 
)
inline

Randomly select dataset points to calculate the objective function.

Template Parameters
DecomposableFunctionTypeType of the function to be evaluated.
Parameters
functionFunction to optimize.
batchSizeBatch size to use for each step.
iteratestarting point.

Definition at line 50 of file random_selection.hpp.

References mlpack::math::RandInt().


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