1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Minor doc fix

This commit is contained in:
Ilya Lysenkov
2011-06-24 12:14:17 +00:00
parent c7840ab126
commit 84e4f59704
3 changed files with 63 additions and 23 deletions
+59 -19
View File
@@ -63,18 +63,35 @@ Importance of each variable is computed over all the splits on this variable in
CvDTreeSplit
------------
.. c:type:: struct CvDTreeSplit
.. c:type:: CvDTreeSplit
Decision tree node split.
The structure represents a possible decision tree node split. It has public members:
* ``int var_idx`` Index of variable on which the split is created.
* ``int inversed`` If it is not null then inverse split rule is used that is a left branch and a right branch are switched.
* ``float quality`` Quality of the split.
* ``CvDTreeSplit* next`` Pointer to the next split in the node list of splits.
* ``int subset[2]`` Parameters of the split on a categorical variable.
* ``struct {float c; int split_point;} ord`` Parameters of the split on ordered variable.
.. ocv:member:: int var_idx
Index of variable on which the split is created.
.. ocv:member:: int inversed
If it is not null then inverse split rule is used that is a left branch and a right branch are switched.
.. ocv:member:: float quality
Quality of the split.
.. ocv:member:: CvDTreeSplit* next
Pointer to the next split in the node list of splits.
.. ocv:member:: int subset[2]
Parameters of the split on a categorical variable.
.. ocv:member:: struct {float c; int split_point;} ord
Parameters of the split on ordered variable.
.. index:: CvDTreeNode
@@ -83,20 +100,43 @@ The structure represents a possible decision tree node split. It has public memb
CvDTreeNode
-----------
.. c:type:: struct CvDTreeNode
.. c:type:: CvDTreeNode
Decision tree node.
The structure represents a node in a decision tree. It has public members:
* ``int Tn`` Tree index in a sequence of pruned trees. Nodes with :math:`Tn \leq CvDTree::pruned\_tree\_idx` are not used at prediction stage (they are pruned).
* ``double value`` Value at the node: a class label in case of classification or estimated function value in case of regression.
* ``CvDTreeNode* parent`` Pointer to the parent node.
* ``CvDTreeNode* left`` Pointer to the left child node.
* ``CvDTreeNode* right`` Pointer to the right child node.
* ``CvDTreeSplit* split`` Pointer to the first (primary) split in the node list of splits.
* ``int sample_count`` Number of samples in the node.
* ``int depth`` Depth of the node.
.. ocv:member:: int Tn
Tree index in a sequence of pruned trees. Nodes with :math:`Tn \leq CvDTree::pruned\_tree\_idx` are not used at prediction stage (they are pruned).
.. ocv:member:: double value
Value at the node: a class label in case of classification or estimated function value in case of regression.
.. ocv:member:: CvDTreeNode* parent
Pointer to the parent node.
.. ocv:mebmer:: CvDTreeNode* left
Pointer to the left child node.
.. ocv:member:: CvDTreeNode* right
Pointer to the right child node.
.. ocv:member:: CvDTreeSplit* split
Pointer to the first (primary) split in the node list of splits.
.. ocv:mebmer:: int sample_count
Number of samples in the node.
.. ocv:member:: int depth
Depth of the node.
Other numerous fields of ``CvDTreeNode`` are used internally at the training stage.
@@ -107,7 +147,7 @@ Other numerous fields of ``CvDTreeNode`` are used internally at the training sta
CvDTreeParams
-------------
.. c:type:: struct CvDTreeParams
.. c:type:: CvDTreeParams
Decision tree training parameters.
@@ -157,7 +197,7 @@ The default constructor initializes all the parameters with the default values t
CvDTreeTrainData
----------------
.. c:type:: struct CvDTreeTrainData
.. c:type:: CvDTreeTrainData
Decision tree training data and shared data for tree ensembles.
@@ -188,7 +228,7 @@ There are two ways of using this structure. In simple cases (for example, a stan
CvDTree
-------
.. ocv:class:: class CvDTree : public CvStatModel
.. ocv:class:: CvDTree
Decision tree.
+2 -2
View File
@@ -53,7 +53,7 @@ In random trees there is no need for any accuracy estimation procedures, such as
CvRTParams
----------
.. ocv:class:: struct CvRTParams : public CvDTreeParams
.. ocv:class:: CvRTParams
Training parameters of random trees.
@@ -97,7 +97,7 @@ The default constructor sets all parameters to some default values and they are
CvRTrees
--------
.. ocv:class:: class CvRTrees : public CvStatModel
.. ocv:class:: CvRTrees
Random trees.
+2 -2
View File
@@ -97,7 +97,7 @@ CvStatModel::clear
Deallocates memory and resets the model state.
The method ``clear`` does the same job as the destructor: it deallocates all the memory occupied by the class members. But the object itself is not destructed and can be reused further. This method is called from the destructor, from the ``train`` methods of the derived classes, from the methods ``load()``,``read()`` , or even explicitly by the user.
The method ``clear`` does the same job as the destructor: it deallocates all the memory occupied by the class members. But the object itself is not destructed and can be reused further. This method is called from the destructor, from the ``train`` methods of the derived classes, from the methods ``load()``, ``read()``, or even explicitly by the user.
.. index:: CvStatModel::save
@@ -189,7 +189,7 @@ Usually, the previous model state is cleared by ``clear()`` before running the t
CvStatModel::predict
--------------------
.. ocv:function:: float CvStatMode::predict( const Mat& sample[, <prediction_params>] ) const
.. ocv:function:: float CvStatModel::predict( const Mat& sample[, <prediction_params>] ) const
Predicts the response for a sample.