Class cv::ml::ParamGrid#

The structure represents the logarithmic grid range of statmodel parameters. View details

#include <opencv2/ml.hpp>

Collaboration diagram for cv::ml::ParamGrid:

cv::ml::ParamGrid Node1 cv::ml::ParamGrid   + ParamGrid() + ParamGrid() + create() Node2 double     Node2->Node1 +logStep +maxVal +minVal

cv::ml::ParamGrid Node1 cv::ml::ParamGrid   + ParamGrid() + ParamGrid() + create() Node2 double     Node2->Node1 +logStep +maxVal +minVal

Detailed Description#

The structure represents the logarithmic grid range of statmodel parameters.

It is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate being computed by cross-validation.

Constructor & Destructor Documentation#

ParamGrid()#

cv::ml::ParamGrid::ParamGrid()

Default constructor.

ParamGrid()#

cv::ml::ParamGrid::ParamGrid(
double _minVal,
double _maxVal,
double _logStep )

Constructor with parameters.

Member Function Documentation#

create()#

static Ptr< ParamGrid > cv::ml::ParamGrid::create(
double minVal = 0.,
double maxVal = 0.,
double logstep = 1. )

Python:

cv.ml.ParamGrid.create([, minVal[, maxVal[, logstep]]]) -> retval
cv.ml.ParamGrid_create([, minVal[, maxVal[, logstep]]]) -> retval

Creates a ParamGrid Ptr that can be given to the SVM::trainAuto method.

Parameters

  • minVal — minimum value of the parameter grid

  • maxVal — maximum value of the parameter grid

  • logstep — Logarithmic step for iterating the statmodel parameter

Member Data Documentation#

logStep#

double cv::ml::ParamGrid::logStep

Logarithmic step for iterating the statmodel parameter.

The grid determines the following iteration sequence of the statmodel parameter values:

\[ (minVal, minVal*step, minVal*{step}^2, \dots, minVal*{logStep}^n), \]

where \(n\) is the maximal index satisfying

\[ \texttt{minVal} * \texttt{logStep} ^n < \texttt{maxVal} \]

The grid is logarithmic, so logStep must always be greater than 1. Default value is 1.

maxVal#

double cv::ml::ParamGrid::maxVal

Maximum value of the statmodel parameter. Default value is 0.

minVal#

double cv::ml::ParamGrid::minVal

Minimum value of the statmodel parameter. Default value is 0.

Source file#

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