Skip to content

ml_ParamGrid

mlclassOpenCV 5.0.0
import { ml_ParamGrid } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSml_ParamGrid
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

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.

Constructors and members

static create

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

create(minVal: number, maxVal: number, logstep: number): ml_ParamGrid | null;
4 available overloads
create(): ml_ParamGrid | null;
create(minVal: number): ml_ParamGrid | null;
create(minVal: number, maxVal: number): ml_ParamGrid | null;
create(minVal: number, maxVal: number, logstep: number): ml_ParamGrid | null;
minVal

minimum value of the parameter grid

maxVal

maximum value of the parameter grid

logstep

Logarithmic step for iterating the statmodel parameter

Returns

The ml_ParamGrid | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

minVal

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

minVal: number;

maxVal

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

maxVal: number;

logStep

Maximum value of the statmodel parameter. Default value is 0. 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.
logStep: number;

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.