Skip to content

ml_Boost

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

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

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


Boosted tree classifier * *************************************************************************************** Boosted tree classifier derived from DTrees

See: ml_intro_boost

Constructors and members

static create

Creates the empty model. Use StatModel::train to train the model, Algorithm::load<Boost>(filename) to load the pre-trained model.

create(): ml_Boost | null;
Returns

The ml_Boost | null result.

static load

Loads and creates a serialized Boost from a file

Use Boost::save to serialize and store an RTree to disk. Load the Boost from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier

load(filepath: EmbindString, nodeName: EmbindString): ml_Boost | null;
2 available overloads
load(filepath: EmbindString): ml_Boost | null;
load(filepath: EmbindString, nodeName: EmbindString): ml_Boost | null;
filepath

path to serialized Boost

nodeName

name of node containing the classifier

Returns

The ml_Boost | 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.

getBoostType

Type of the boosting algorithm. See Boost::Types. Default value is Boost::REAL. See: setBoostType

getBoostType(): number;
Returns

The number result.

setBoostType

Type of the boosting algorithm. See Boost::Types. Default value is Boost::REAL. See: setBoostType See: getBoostType

setBoostType(val: number): void;
val

val argument (number).

getWeakCount

The number of weak classifiers. Default value is 100. See: setWeakCount

getWeakCount(): number;
Returns

The number result.

setWeakCount

The number of weak classifiers. Default value is 100. See: setWeakCount See: getWeakCount

setWeakCount(val: number): void;
val

val argument (number).

getWeightTrimRate

A threshold between 0 and 1 used to save computational time. Samples with summary weight \leq 1 - weight_trim_rate do not participate in the next iteration of training. Set this parameter to 0 to turn off this functionality. Default value is 0.95. See: setWeightTrimRate

getWeightTrimRate(): number;
Returns

The number result.

setWeightTrimRate

A threshold between 0 and 1 used to save computational time. Samples with summary weight \leq 1 - weight_trim_rate do not participate in the next iteration of training. Set this parameter to 0 to turn off this functionality. Default value is 0.95. See: setWeightTrimRate See: getWeightTrimRate

setWeightTrimRate(val: number): void;
val

val argument (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.