Class cv::ml::Boost#
Boosted tree classifier derived from DTrees. View details
#include <opencv2/ml.hpp>Collaboration diagram for cv::ml::Boost:
Public Types#
Public Types inherited from cv::ml::DTrees
Return |
Name |
Description |
|---|---|---|
Public Types inherited from cv::ml::StatModel
Return |
Name |
Description |
|---|---|---|
Public Member Functions#
Public Member Functions inherited from cv::ml::DTrees
Return |
Name |
Description |
|---|---|---|
|
||
|
||
|
||
|
||
|
Returns all the nodes. |
|
The array of a priori class probabilities, sorted by the class label value. |
||
|
||
|
Returns indices of root nodes. |
|
|
Returns all the splits. |
|
|
Returns all the bitsets for categorical splits. |
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
The array of a priori class probabilities, sorted by the class label value. |
|
|
||
|
||
|
||
|
Public Member Functions inherited from cv::ml::StatModel
Return |
Name |
Description |
|---|---|---|
|
|
Computes error on the training or test dataset. |
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Returns the number of variables in training samples. |
|
|
Returns true if the model is classifier. |
|
|
Returns true if the model is trained. |
|
|
|
Predicts response(s) for the provided sample(s) |
|
Trains the statistical model. |
|
|
|
Trains the statistical model. |
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::ml::DTrees
Static Public Member Functions inherited from cv::ml::StatModel
Return |
Name |
Description |
|---|---|---|
|
Create and train model with default parameters. |
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
Boosted tree classifier derived from DTrees.
See also
ml_intro_boost
Member Enumeration Documentation#
enum Types
|
Discrete AdaBoost. |
|
Real AdaBoost. It is a technique that utilizes confidence-rated predictions and works well with categorical data. |
|
LogitBoost. It can produce good regression fits. |
|
Gentle AdaBoost. It puts less weight on outlier data points and for that reason is often good with regression data. |
Member Function Documentation#
getBoostType()#
int cv::ml::Boost::getBoostType()
Python:
cv.ml.Boost.getBoostType() -> retval
Type of the boosting algorithm. See Boost::Types. Default value is Boost::REAL.
See also
getWeakCount()#
int cv::ml::Boost::getWeakCount()
Python:
cv.ml.Boost.getWeakCount() -> retval
The number of weak classifiers. Default value is 100.
See also
getWeightTrimRate()#
double cv::ml::Boost::getWeightTrimRate()
Python:
cv.ml.Boost.getWeightTrimRate() -> retval
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 also
setBoostType()#
void cv::ml::Boost::setBoostType(int val)
Python:
cv.ml.Boost.setBoostType(val)
See also
setWeakCount()#
void cv::ml::Boost::setWeakCount(int val)
Python:
cv.ml.Boost.setWeakCount(val)
See also
setWeightTrimRate()#
void cv::ml::Boost::setWeightTrimRate(double val)
Python:
cv.ml.Boost.setWeightTrimRate(val)
See also
create()#
static Ptr< Boost > cv::ml::Boost::create()
Python:
cv.ml.Boost.create() -> retval
cv.ml.Boost_create() -> retval
Creates the empty model. Use StatModel::train to train the model, Algorithm::load<Boost>(filename) to load the pre-trained model.
load()#
static Ptr< Boost > cv::ml::Boost::load(
const String & filepath,
const String & nodeName = String() )
Python:
cv.ml.Boost.load(filepath[, nodeName]) -> retval
cv.ml.Boost_load(filepath[, nodeName]) -> retval
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
Parameters
filepath— path to serialized BoostnodeName— name of node containing the classifier
Source file#
The documentation for this class was generated from the following file:
opencv2/ml.hpp