started work on API & doc synchronization (in particular, Mat& => Input/OutputArray in the descriptions)
This commit is contained in:
@@ -221,7 +221,7 @@ Boosted tree classifier ::
|
||||
|
||||
CvBoost::train
|
||||
--------------
|
||||
.. c:function:: bool CvBoost::train( const CvMat* _train_data, int _tflag, const CvMat* _responses, const CvMat* _var_idx=0, const CvMat* _sample_idx=0, const CvMat* _var_type=0, const CvMat* _missing_mask=0, CvBoostParams params=CvBoostParams(), bool update=false )
|
||||
.. cpp:function:: bool CvBoost::train( const CvMat* _train_data, int _tflag, const CvMat* _responses, const CvMat* _var_idx=0, const CvMat* _sample_idx=0, const CvMat* _var_type=0, const CvMat* _missing_mask=0, CvBoostParams params=CvBoostParams(), bool update=false )
|
||||
|
||||
Trains a boosted tree classifier.
|
||||
|
||||
@@ -233,7 +233,7 @@ The train method follows the common template. The last parameter ``update`` spec
|
||||
|
||||
CvBoost::predict
|
||||
----------------
|
||||
.. c:function:: float CvBoost::predict( const CvMat* sample, const CvMat* missing=0, CvMat* weak_responses=0, CvSlice slice=CV_WHOLE_SEQ, bool raw_mode=false ) const
|
||||
.. cpp:function:: float CvBoost::predict( const CvMat* sample, const CvMat* missing=0, CvMat* weak_responses=0, CvSlice slice=CV_WHOLE_SEQ, bool raw_mode=false ) const
|
||||
|
||||
Predicts a response for an input sample.
|
||||
|
||||
@@ -245,7 +245,7 @@ The method ``CvBoost::predict`` runs the sample through the trees in the ensembl
|
||||
|
||||
CvBoost::prune
|
||||
--------------
|
||||
.. c:function:: void CvBoost::prune( CvSlice slice )
|
||||
.. cpp:function:: void CvBoost::prune( CvSlice slice )
|
||||
|
||||
Removes the specified weak classifiers.
|
||||
|
||||
@@ -261,7 +261,7 @@ Do not confuse this method with the pruning of individual decision trees, which
|
||||
|
||||
CvBoost::get_weak_predictors
|
||||
----------------------------
|
||||
.. c:function:: CvSeq* CvBoost::get_weak_predictors()
|
||||
.. cpp:function:: CvSeq* CvBoost::get_weak_predictors()
|
||||
|
||||
Returns the sequence of weak tree classifiers.
|
||||
|
||||
|
||||
@@ -371,9 +371,9 @@ Decision tree ::
|
||||
|
||||
CvDTree::train
|
||||
--------------
|
||||
.. c:function:: bool CvDTree::train( const CvMat* _train_data, int _tflag, const CvMat* _responses, const CvMat* _var_idx=0, const CvMat* _sample_idx=0, const CvMat* _var_type=0, const CvMat* _missing_mask=0, CvDTreeParams params=CvDTreeParams() )
|
||||
.. cpp:function:: bool CvDTree::train( const CvMat* _train_data, int _tflag, const CvMat* _responses, const CvMat* _var_idx=0, const CvMat* _sample_idx=0, const CvMat* _var_type=0, const CvMat* _missing_mask=0, CvDTreeParams params=CvDTreeParams() )
|
||||
|
||||
.. c:function:: bool CvDTree::train( CvDTreeTrainData* _train_data, const CvMat* _subsample_idx )
|
||||
.. cpp:function:: bool CvDTree::train( CvDTreeTrainData* _train_data, const CvMat* _subsample_idx )
|
||||
|
||||
Trains a decision tree.
|
||||
|
||||
@@ -391,7 +391,7 @@ There are two ``train`` methods in ``CvDTree`` :
|
||||
|
||||
CvDTree::predict
|
||||
----------------
|
||||
.. c:function:: CvDTreeNode* CvDTree::predict( const CvMat* _sample, const CvMat* _missing_data_mask=0, bool raw_mode=false ) const
|
||||
.. cpp:function:: CvDTreeNode* CvDTree::predict( const CvMat* _sample, const CvMat* _missing_data_mask=0, bool raw_mode=false ) const
|
||||
|
||||
Returns the leaf node of a decision tree corresponding to the input vector.
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ EM model ::
|
||||
|
||||
CvEM::train
|
||||
-----------
|
||||
.. c:function:: void CvEM::train( const CvMat* samples, const CvMat* sample_idx=0, CvEMParams params=CvEMParams(), CvMat* labels=0 )
|
||||
.. cpp:function:: void CvEM::train( const CvMat* samples, const CvMat* sample_idx=0, CvEMParams params=CvEMParams(), CvMat* labels=0 )
|
||||
|
||||
Estimates the Gaussian mixture parameters from a sample set.
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ K-Nearest Neighbors model ::
|
||||
|
||||
CvKNearest::train
|
||||
-----------------
|
||||
.. c:function:: bool CvKNearest::train( const CvMat* _train_data, const CvMat* _responses, const CvMat* _sample_idx=0, bool is_regression=false, int _max_k=32, bool _update_base=false )
|
||||
.. cpp:function:: bool CvKNearest::train( const CvMat* _train_data, const CvMat* _responses, const CvMat* _sample_idx=0, bool is_regression=false, int _max_k=32, bool _update_base=false )
|
||||
|
||||
Trains the model.
|
||||
|
||||
@@ -70,7 +70,7 @@ The parameter ``_update_base`` specifies whether the model is trained from scrat
|
||||
|
||||
CvKNearest::find_nearest
|
||||
------------------------
|
||||
.. c:function:: float CvKNearest::find_nearest( const CvMat* _samples, int k, CvMat* results=0, const float** neighbors=0, CvMat* neighbor_responses=0, CvMat* dist=0 ) const
|
||||
.. cpp:function:: float CvKNearest::find_nearest( const CvMat* _samples, int k, CvMat* results=0, const float** neighbors=0, CvMat* neighbor_responses=0, CvMat* dist=0 ) const
|
||||
|
||||
Finds the neighbors for input vectors.
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ Unlike many other models in ML that are constructed and trained at once, in the
|
||||
|
||||
CvANN_MLP::create
|
||||
-----------------
|
||||
.. c:function:: void CvANN_MLP::create( const CvMat* _layer_sizes, int _activ_func=SIGMOID_SYM, double _f_param1=0, double _f_param2=0 )
|
||||
.. cpp:function:: void CvANN_MLP::create( const CvMat* _layer_sizes, int _activ_func=SIGMOID_SYM, double _f_param1=0, double _f_param2=0 )
|
||||
|
||||
Constructs MLP with the specified topology.
|
||||
|
||||
@@ -243,7 +243,7 @@ The method creates an MLP network with the specified topology and assigns the sa
|
||||
|
||||
CvANN_MLP::train
|
||||
----------------
|
||||
.. c:function:: int CvANN_MLP::train( const CvMat* _inputs, const CvMat* _outputs, const CvMat* _sample_weights, const CvMat* _sample_idx=0, CvANN_MLP_TrainParams _params = CvANN_MLP_TrainParams(), int flags=0 )
|
||||
.. cpp:function:: int CvANN_MLP::train( const CvMat* _inputs, const CvMat* _outputs, const CvMat* _sample_weights, const CvMat* _sample_idx=0, CvANN_MLP_TrainParams _params = CvANN_MLP_TrainParams(), int flags=0 )
|
||||
|
||||
Trains/updates MLP.
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ Bayes classifier for normally distributed data ::
|
||||
|
||||
CvNormalBayesClassifier::train
|
||||
------------------------------
|
||||
.. c:function:: bool CvNormalBayesClassifier::train( const CvMat* _train_data, const CvMat* _responses, const CvMat* _var_idx =0, const CvMat* _sample_idx=0, bool update=false )
|
||||
.. cpp:function:: bool CvNormalBayesClassifier::train( const CvMat* _train_data, const CvMat* _responses, const CvMat* _var_idx =0, const CvMat* _sample_idx=0, bool update=false )
|
||||
|
||||
Trains the model.
|
||||
|
||||
@@ -65,7 +65,7 @@ In addition, there is an ``update`` flag that identifies whether the model shoul
|
||||
|
||||
CvNormalBayesClassifier::predict
|
||||
--------------------------------
|
||||
.. c:function:: float CvNormalBayesClassifier::predict( const CvMat* samples, CvMat* results=0 ) const
|
||||
.. cpp:function:: float CvNormalBayesClassifier::predict( const CvMat* samples, CvMat* results=0 ) const
|
||||
|
||||
Predicts the response for sample(s).
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ Random trees ::
|
||||
|
||||
CvRTrees::train
|
||||
---------------
|
||||
.. c:function:: bool CvRTrees::train( const CvMat* train_data, int tflag, const CvMat* responses, const CvMat* comp_idx=0, const CvMat* sample_idx=0, const CvMat* var_type=0, const CvMat* missing_mask=0, CvRTParams params=CvRTParams() )
|
||||
.. cpp:function:: bool CvRTrees::train( const CvMat* train_data, int tflag, const CvMat* responses, const CvMat* comp_idx=0, const CvMat* sample_idx=0, const CvMat* var_type=0, const CvMat* missing_mask=0, CvRTParams params=CvRTParams() )
|
||||
|
||||
Trains the Random Tree model.
|
||||
|
||||
@@ -149,7 +149,7 @@ The method ``CvRTrees::train`` is very similar to the first form of ``CvDTree::t
|
||||
|
||||
CvRTrees::predict
|
||||
-----------------
|
||||
.. c:function:: double CvRTrees::predict( const CvMat* sample, const CvMat* missing=0 ) const
|
||||
.. cpp:function:: double CvRTrees::predict( const CvMat* sample, const CvMat* missing=0 ) const
|
||||
|
||||
Predicts the output for an input sample.
|
||||
|
||||
@@ -161,7 +161,7 @@ The input parameters of the prediction method are the same as in ``CvDTree::pred
|
||||
|
||||
CvRTrees::get_var_importance
|
||||
----------------------------
|
||||
.. c:function:: const CvMat* CvRTrees::get_var_importance() const
|
||||
.. cpp:function:: const CvMat* CvRTrees::get_var_importance() const
|
||||
|
||||
Retrieves the variable importance array.
|
||||
|
||||
@@ -173,7 +173,7 @@ The method returns the variable importance vector, computed at the training stag
|
||||
|
||||
CvRTrees::get_proximity
|
||||
-----------------------
|
||||
.. c:function:: float CvRTrees::get_proximity( const CvMat* sample_1, const CvMat* sample_2 ) const
|
||||
.. cpp:function:: float CvRTrees::get_proximity( const CvMat* sample_1, const CvMat* sample_2 ) const
|
||||
|
||||
Retrieves the proximity measure between two training samples.
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ In this declaration, some methods are commented off. These are methods for which
|
||||
|
||||
CvStatModel::CvStatModel
|
||||
------------------------
|
||||
.. c:function:: CvStatModel::CvStatModel()
|
||||
.. cpp:function:: CvStatModel::CvStatModel()
|
||||
|
||||
Serves as a default constructor.
|
||||
|
||||
@@ -58,7 +58,7 @@ Each statistical model class in ML has a default constructor without parameters.
|
||||
|
||||
CvStatModel::CvStatModel(...)
|
||||
-----------------------------
|
||||
.. c:function:: CvStatModel::CvStatModel( const CvMat* train_data ... )
|
||||
.. cpp:function:: CvStatModel::CvStatModel( const CvMat* train_data ... )
|
||||
|
||||
Serves as a training constructor.
|
||||
|
||||
@@ -70,7 +70,7 @@ Most ML classes provide a single-step constructor and train constructors. This c
|
||||
|
||||
CvStatModel::~CvStatModel
|
||||
-------------------------
|
||||
.. c:function:: CvStatModel::~CvStatModel()
|
||||
.. cpp:function:: CvStatModel::~CvStatModel()
|
||||
|
||||
Serves as a virtual destructor.
|
||||
|
||||
@@ -93,7 +93,7 @@ Normally, the destructor of each derived class does nothing. But in this instanc
|
||||
|
||||
CvStatModel::clear
|
||||
------------------
|
||||
.. c:function:: void CvStatModel::clear()
|
||||
.. cpp:function:: void CvStatModel::clear()
|
||||
|
||||
Deallocates memory and resets the model state.
|
||||
|
||||
@@ -105,7 +105,7 @@ The method ``clear`` does the same job as the destructor: it deallocates all the
|
||||
|
||||
CvStatModel::save
|
||||
-----------------
|
||||
.. c:function:: void CvStatModel::save( const char* filename, const char* name=0 )
|
||||
.. cpp:function:: void CvStatModel::save( const char* filename, const char* name=0 )
|
||||
|
||||
Saves the model to a file.
|
||||
|
||||
@@ -117,7 +117,7 @@ The method ``save`` saves the complete model state to the specified XML or YAML
|
||||
|
||||
CvStatModel::load
|
||||
-----------------
|
||||
.. c:function:: void CvStatModel::load( const char* filename, const char* name=0 )
|
||||
.. cpp:function:: void CvStatModel::load( const char* filename, const char* name=0 )
|
||||
|
||||
Loads the model from a file.
|
||||
|
||||
@@ -134,7 +134,7 @@ The method is virtual, so any model can be loaded using this virtual method. How
|
||||
|
||||
CvStatModel::write
|
||||
------------------
|
||||
.. c:function:: void CvStatModel::write( CvFileStorage* storage, const char* name )
|
||||
.. cpp:function:: void CvStatModel::write( CvFileStorage* storage, const char* name )
|
||||
|
||||
Writes the model to the file storage.
|
||||
|
||||
@@ -146,7 +146,7 @@ The method ``write`` stores the complete model state in the file storage with th
|
||||
|
||||
CvStatModel::read
|
||||
-----------------
|
||||
.. c:function:: void CvStatMode::read( CvFileStorage* storage, CvFileNode* node )
|
||||
.. cpp:function:: void CvStatMode::read( CvFileStorage* storage, CvFileNode* node )
|
||||
|
||||
Reads the model from the file storage.
|
||||
|
||||
@@ -161,7 +161,7 @@ The previous model state is cleared by ``clear()`` .
|
||||
|
||||
CvStatModel::train
|
||||
------------------
|
||||
.. c:function:: bool CvStatMode::train( const CvMat* train_data, [int tflag,] ..., const CvMat* responses, ..., [const CvMat* var_idx,] ..., [const CvMat* sample_idx,] ... [const CvMat* var_type,] ..., [const CvMat* missing_mask,] <misc_training_alg_params> ... )
|
||||
.. cpp:function:: bool CvStatMode::train( const CvMat* train_data, [int tflag,] ..., const CvMat* responses, ..., [const CvMat* var_idx,] ..., [const CvMat* sample_idx,] ... [const CvMat* var_type,] ..., [const CvMat* missing_mask,] <misc_training_alg_params> ... )
|
||||
|
||||
Trains the model.
|
||||
|
||||
@@ -193,7 +193,7 @@ Usually, the previous model state is cleared by ``clear()`` before running the t
|
||||
|
||||
CvStatModel::predict
|
||||
--------------------
|
||||
.. c:function:: float CvStatMode::predict( const CvMat* sample[, <prediction_params>] ) const
|
||||
.. cpp:function:: float CvStatMode::predict( const CvMat* sample[, <prediction_params>] ) const
|
||||
|
||||
Predicts the response for a sample.
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ The structure must be initialized and passed to the training method of
|
||||
|
||||
CvSVM::train
|
||||
------------
|
||||
.. c:function:: bool CvSVM::train( const CvMat* _train_data, const CvMat* _responses, const CvMat* _var_idx=0, const CvMat* _sample_idx=0, CvSVMParams _params=CvSVMParams() )
|
||||
.. cpp:function:: bool CvSVM::train( const CvMat* _train_data, const CvMat* _responses, const CvMat* _var_idx=0, const CvMat* _sample_idx=0, CvSVMParams _params=CvSVMParams() )
|
||||
|
||||
Trains SVM.
|
||||
|
||||
@@ -145,7 +145,7 @@ All the other parameters are gathered in the
|
||||
|
||||
CvSVM::train_auto
|
||||
-----------------
|
||||
.. c:function:: train_auto( const CvMat* _train_data, const CvMat* _responses, const CvMat* _var_idx, const CvMat* _sample_idx, CvSVMParams params, int k_fold = 10, CvParamGrid C_grid = get_default_grid(CvSVM::C), CvParamGrid gamma_grid = get_default_grid(CvSVM::GAMMA), CvParamGrid p_grid = get_default_grid(CvSVM::P), CvParamGrid nu_grid = get_default_grid(CvSVM::NU), CvParamGrid coef_grid = get_default_grid(CvSVM::COEF), CvParamGrid degree_grid = get_default_grid(CvSVM::DEGREE) )
|
||||
.. cpp:function:: train_auto( const CvMat* _train_data, const CvMat* _responses, const CvMat* _var_idx, const CvMat* _sample_idx, CvSVMParams params, int k_fold = 10, CvParamGrid C_grid = get_default_grid(CvSVM::C), CvParamGrid gamma_grid = get_default_grid(CvSVM::GAMMA), CvParamGrid p_grid = get_default_grid(CvSVM::P), CvParamGrid nu_grid = get_default_grid(CvSVM::NU), CvParamGrid coef_grid = get_default_grid(CvSVM::COEF), CvParamGrid degree_grid = get_default_grid(CvSVM::DEGREE) )
|
||||
|
||||
Trains SVM with optimal parameters.
|
||||
|
||||
@@ -189,7 +189,7 @@ as well as for the regression
|
||||
|
||||
CvSVM::get_default_grid
|
||||
-----------------------
|
||||
.. c:function:: CvParamGrid CvSVM::get_default_grid( int param_id )
|
||||
.. cpp:function:: CvParamGrid CvSVM::get_default_grid( int param_id )
|
||||
|
||||
Generates a grid for SVM parameters.
|
||||
|
||||
@@ -217,7 +217,7 @@ The function generates a grid for the specified parameter of the SVM algorithm.
|
||||
|
||||
CvSVM::get_params
|
||||
-----------------
|
||||
.. c:function:: CvSVMParams CvSVM::get_params() const
|
||||
.. cpp:function:: CvSVMParams CvSVM::get_params() const
|
||||
|
||||
Returns the current SVM parameters.
|
||||
|
||||
@@ -229,9 +229,9 @@ This function may be used to get the optimal parameters obtained while automatic
|
||||
|
||||
CvSVM::get_support_vector*
|
||||
--------------------------
|
||||
.. c:function:: int CvSVM::get_support_vector_count() const
|
||||
.. cpp:function:: int CvSVM::get_support_vector_count() const
|
||||
|
||||
.. c:function:: const float* CvSVM::get_support_vector(int i) const
|
||||
.. cpp:function:: const float* CvSVM::get_support_vector(int i) const
|
||||
|
||||
Retrieves a number of support vectors and the particular vector.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user