From 0bd3d6d2aaa67b5cd32d2a3a3ca7db8175335e07 Mon Sep 17 00:00:00 2001 From: Ilya Lysenkov Date: Fri, 24 Jun 2011 13:05:45 +0000 Subject: [PATCH] Minor doc fixes --- doc/check_docs_whitelist.txt | 6 ++++-- modules/ml/doc/decision_trees.rst | 4 ++-- modules/ml/doc/expectation_maximization.rst | 4 ++-- modules/ml/doc/gradient_boosted_trees.rst | 12 ++++++------ modules/ml/doc/random_trees.rst | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/doc/check_docs_whitelist.txt b/doc/check_docs_whitelist.txt index c4521b8813..c36edd582b 100644 --- a/doc/check_docs_whitelist.txt +++ b/doc/check_docs_whitelist.txt @@ -43,8 +43,6 @@ Mat cv::findFundamentalMat( InputArray points1, InputArray points2, OutputArray Mat findHomography( InputArray srcPoints, InputArray dstPoints, OutputArray mask, int method=0, double ransacReprojThreshold=3); ########################################## ml ###################################### -cvParamLattice -cvDefaultParamLattice CvBoostTree CvForestTree CvSVMKernel @@ -53,6 +51,8 @@ CvDTreeTrainData CvERTreeTrainData CvKNearest::CvKNearest CvKNearest::clear +CvDTreeNode::get_num_valid +CvDTreeNode::set_num_valid CvDTree::CvDTree CvDTree::clear CvDTree::read @@ -87,3 +87,5 @@ CvANN_MLP::clear CvANN_MLP::read CvANN_MLP::write CvTrainTestSplit +cvParamLattice +cvDefaultParamLattice diff --git a/modules/ml/doc/decision_trees.rst b/modules/ml/doc/decision_trees.rst index 7212eb37b5..fa21e2ac0b 100644 --- a/modules/ml/doc/decision_trees.rst +++ b/modules/ml/doc/decision_trees.rst @@ -247,7 +247,7 @@ CvDTree::train .. ocv:function:: bool CvDTree::train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() ) -.. ocv:function:: bool CvDTree::train( CvDTreeTrainData* train_data, const Mat& subsample_idx ) +.. ocv:function:: bool CvDTree::train( CvDTreeTrainData* trainData, const CvMat* subsampleIdx ) Trains a decision tree. @@ -257,7 +257,7 @@ There are four ``train`` methods in :ocv:class:`CvDTree`: * The **third** method uses :ocv:class:`CvMLData` to pass training data to a decision tree. -* The **last** method ``train`` is mostly used for building tree ensembles. It takes the pre-constructed :ref:`CvDTreeTrainData` instance and an optional subset of the training set. The indices in ``subsample_idx`` are counted relatively to the ``_sample_idx`` , passed to the ``CvDTreeTrainData`` constructor. For example, if ``_sample_idx=[1, 5, 7, 100]`` , then ``subsample_idx=[0,3]`` means that the samples ``[1, 100]`` of the original training set are used. +* The **last** method ``train`` is mostly used for building tree ensembles. It takes the pre-constructed :ref:`CvDTreeTrainData` instance and an optional subset of the training set. The indices in ``subsampleIdx`` are counted relatively to the ``_sample_idx`` , passed to the ``CvDTreeTrainData`` constructor. For example, if ``_sample_idx=[1, 5, 7, 100]`` , then ``subsampleIdx=[0,3]`` means that the samples ``[1, 100]`` of the original training set are used. .. index:: CvDTree::predict diff --git a/modules/ml/doc/expectation_maximization.rst b/modules/ml/doc/expectation_maximization.rst index 7b61af9887..18a38dae70 100644 --- a/modules/ml/doc/expectation_maximization.rst +++ b/modules/ml/doc/expectation_maximization.rst @@ -102,9 +102,9 @@ All parameters are public. You can initialize them by a constructor and then ove CvEMParams::CvEMParams ---------------------- -.. ocv:function:: CvEMParams() +.. ocv:function:: CvEMParams::CvEMParams() -.. ocv:function:: CvEMParams( int nclusters, int cov_mat_type=1/*CvEM::COV_MAT_DIAGONAL*/, int start_step=0/*CvEM::START_AUTO_STEP*/, CvTermCriteria term_crit=cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 100, FLT_EPSILON), const CvMat* probs=0, const CvMat* weights=0, const CvMat* means=0, const CvMat** covs=0 ) +.. ocv:function:: CvEMParams::CvEMParams( int nclusters, int cov_mat_type=1/*CvEM::COV_MAT_DIAGONAL*/, int start_step=0/*CvEM::START_AUTO_STEP*/, CvTermCriteria term_crit=cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 100, FLT_EPSILON), const CvMat* probs=0, const CvMat* weights=0, const CvMat* means=0, const CvMat** covs=0 ) :param nclusters: The number of mixtures in the gaussian mixture model. diff --git a/modules/ml/doc/gradient_boosted_trees.rst b/modules/ml/doc/gradient_boosted_trees.rst index 0badb382d2..9a7955f046 100644 --- a/modules/ml/doc/gradient_boosted_trees.rst +++ b/modules/ml/doc/gradient_boosted_trees.rst @@ -238,9 +238,9 @@ GBT model. :: CvGBTrees::train ---------------- -.. ocv:function:: bool train(const Mat & trainData, int tflag, const Mat & responses, const Mat & varIdx=Mat(), const Mat & sampleIdx=Mat(), const Mat & varType=Mat(), const Mat & missingDataMask=Mat(), CvGBTreesParams params=CvGBTreesParams(), bool update=false) +.. ocv:function:: bool CvGBTrees::train(const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvGBTreesParams params=CvGBTreesParams(), bool update=false) -.. ocv:function:: bool train(CvMLData* data, CvGBTreesParams params=CvGBTreesParams(), bool update=false) +.. ocv:function:: bool CvGBTrees::train(CvMLData* data, CvGBTreesParams params=CvGBTreesParams(), bool update=false) Trains a Gradient boosted tree model. @@ -265,7 +265,7 @@ as a :ocv:class:`CvGBTreesParams` structure. CvGBTrees::predict ------------------ -.. ocv:function:: float predict(const Mat & sample, const Mat & missing=Mat(), const Range & slice = Range::all(), int k=-1) const +.. ocv:function:: float CvGBTrees::predict(const Mat& sample, const Mat& missing=Mat(), const Range& slice = Range::all(), int k=-1) const Predicts a response for an input sample. @@ -308,7 +308,7 @@ of single trees are computed in a parallel fashion. CvGBTrees::clear ---------------- -.. ocv:function:: void clear() +.. ocv:function:: void CvGBTrees::clear() Clears the model. @@ -323,7 +323,7 @@ destructor. CvGBTrees::calc_error --------------------- -.. ocv:function:: float calc_error( CvMLData* _data, int type, std::vector *resp = 0 ) +.. ocv:function:: float CvGBTrees::calc_error( CvMLData* _data, int type, std::vector *resp = 0 ) Calculates a training or testing error. @@ -340,4 +340,4 @@ used to get a training/testing error easily and (optionally) all predictions on the training/testing set. If the Intel* TBB* library is used, the error is computed in a parallel way, namely, predictions for different samples are computed at the same time. In case of a regression problem, a mean squared error is returned. For -classifications, the result is a misclassification error in percent. \ No newline at end of file +classifications, the result is a misclassification error in percent. diff --git a/modules/ml/doc/random_trees.rst b/modules/ml/doc/random_trees.rst index 37e17d334b..51cd4b48f4 100644 --- a/modules/ml/doc/random_trees.rst +++ b/modules/ml/doc/random_trees.rst @@ -114,7 +114,7 @@ CvRTrees::train .. ocv:function:: bool CvRTrees::train( const Mat& trainData, int tflag, const Mat& responses, const Mat& varIdx=Mat(), const Mat& sampleIdx=Mat(), const Mat& varType=Mat(), const Mat& missingDataMask=Mat(), CvRTParams params=CvRTParams() ) -.. ocv:function:: bool CvRTress::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvRTParams params=CvRTParams() ) +.. ocv:function:: bool CvRTrees::train( const CvMat* trainData, int tflag, const CvMat* responses, const CvMat* varIdx=0, const CvMat* sampleIdx=0, const CvMat* varType=0, const CvMat* missingDataMask=0, CvRTParams params=CvRTParams() ) Trains the Random Tree model.