iRoCS Toolbox  1.1.0
Public Member Functions
svt::GridSearch Class Reference

#include <GridSearch.hh>

Collaboration diagram for svt::GridSearch:

Public Member Functions

 GridSearch ()
 
template<typename CROSSVALIDATOR >
void search2D (const GridAxis &row, const GridAxis &col, CROSSVALIDATOR *cv, const std::vector< int > &subsetIndexByUID, std::vector< svt::StDataASCII > &gridPointInfos, unsigned int &bestGridPointIndex, std::vector< svt::SingleClassResult > &bestResultTable)
 search on a 2D grid (line wise). More...
 
void setPrintGridFlag (int printGridLevel)
 wether to print the grid (via ProgressReporter) during evaluation (default 0) More...
 
void setProgressReporter (ProgressReporter *pr)
 set progress reporter object. More...
 

Detailed Description

Definition at line 56 of file GridSearch.hh.

Constructor & Destructor Documentation

◆ GridSearch()

svt::GridSearch::GridSearch ( )
inline

Definition at line 60 of file GridSearch.hh.

Member Function Documentation

◆ setProgressReporter()

void svt::GridSearch::setProgressReporter ( ProgressReporter pr)
inline

set progress reporter object.

0 means no progress reporting. You are still the owner of this object, so you are responsible, that it exists during further calls to train(), etc. and that it is deleted afterwards

Parameters
prpointer to ProgressReporter object or 0 if no progress reposting is desired

Definition at line 77 of file GridSearch.hh.

◆ setPrintGridFlag()

void svt::GridSearch::setPrintGridFlag ( int  printGridLevel)
inline

wether to print the grid (via ProgressReporter) during evaluation (default 0)

Parameters
printGridLevel0: nothing, 1: print the grid

Definition at line 92 of file GridSearch.hh.

◆ search2D()

template<typename CROSSVALIDATOR >
void svt::GridSearch::search2D ( const GridAxis row,
const GridAxis col,
CROSSVALIDATOR *  cv,
const std::vector< int > &  subsetIndexByUID,
std::vector< svt::StDataASCII > &  gridPointInfos,
unsigned int &  bestGridPointIndex,
std::vector< svt::SingleClassResult > &  bestResultTable 
)

search on a 2D grid (line wise).

For speed optimziation, the changesKernel() flag of col (and row) may be set to false. In this case a cached Kernel Matrix of the previous gridpoint is reused.

Parameters
rowparameter name and its values along the grids row
colparameter name and its values along the grids column
cvthe cross validator that is executed at each grid point (setTrainingData() must be done already)
subsetIndexByUIDdivision of training data into subsets for doFullCV() method of cross validator
gridPointInfos(output) crossvalidation results for each grid point (linear storage: index = row*ncols+col). vector will be resized properly
bestGridPointIndex(output) index of the gridpoint with best crossvalidation result.
bestResultTableper class results. vector will be resized properly

Referenced by setPrintGridFlag().


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