Commit 84e4f597 authored by Ilya Lysenkov's avatar Ilya Lysenkov

Minor doc fix

parent c7840ab1
...@@ -63,18 +63,35 @@ Importance of each variable is computed over all the splits on this variable in ...@@ -63,18 +63,35 @@ Importance of each variable is computed over all the splits on this variable in
CvDTreeSplit CvDTreeSplit
------------ ------------
.. c:type:: struct CvDTreeSplit .. c:type:: CvDTreeSplit
Decision tree node split. Decision tree node split.
The structure represents a possible decision tree node split. It has public members: 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. .. ocv:member:: int var_idx
* ``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. Index of variable on which the split is created.
* ``CvDTreeSplit* next`` Pointer to the next split in the node list of splits.
* ``int subset[2]`` Parameters of the split on a categorical variable. .. ocv:member:: int inversed
* ``struct {float c; int split_point;} ord`` Parameters of the split on ordered variable.
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 .. index:: CvDTreeNode
...@@ -83,20 +100,43 @@ The structure represents a possible decision tree node split. It has public memb ...@@ -83,20 +100,43 @@ The structure represents a possible decision tree node split. It has public memb
CvDTreeNode CvDTreeNode
----------- -----------
.. c:type:: struct CvDTreeNode .. c:type:: CvDTreeNode
Decision tree node. Decision tree node.
The structure represents a node in a decision tree. It has public members: 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). .. ocv:member:: int Tn
* ``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. 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).
* ``CvDTreeNode* left`` Pointer to the left child node.
* ``CvDTreeNode* right`` Pointer to the right child node. .. ocv:member:: double value
* ``CvDTreeSplit* split`` Pointer to the first (primary) split in the node list of splits.
* ``int sample_count`` Number of samples in the node. Value at the node: a class label in case of classification or estimated function value in case of regression.
* ``int depth`` Depth of the node.
.. 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. 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 ...@@ -107,7 +147,7 @@ Other numerous fields of ``CvDTreeNode`` are used internally at the training sta
CvDTreeParams CvDTreeParams
------------- -------------
.. c:type:: struct CvDTreeParams .. c:type:: CvDTreeParams
Decision tree training parameters. Decision tree training parameters.
...@@ -157,7 +197,7 @@ The default constructor initializes all the parameters with the default values t ...@@ -157,7 +197,7 @@ The default constructor initializes all the parameters with the default values t
CvDTreeTrainData CvDTreeTrainData
---------------- ----------------
.. c:type:: struct CvDTreeTrainData .. c:type:: CvDTreeTrainData
Decision tree training data and shared data for tree ensembles. 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 ...@@ -188,7 +228,7 @@ There are two ways of using this structure. In simple cases (for example, a stan
CvDTree CvDTree
------- -------
.. ocv:class:: class CvDTree : public CvStatModel .. ocv:class:: CvDTree
Decision tree. Decision tree.
......
...@@ -53,7 +53,7 @@ In random trees there is no need for any accuracy estimation procedures, such as ...@@ -53,7 +53,7 @@ In random trees there is no need for any accuracy estimation procedures, such as
CvRTParams CvRTParams
---------- ----------
.. ocv:class:: struct CvRTParams : public CvDTreeParams .. ocv:class:: CvRTParams
Training parameters of random trees. Training parameters of random trees.
...@@ -97,7 +97,7 @@ The default constructor sets all parameters to some default values and they are ...@@ -97,7 +97,7 @@ The default constructor sets all parameters to some default values and they are
CvRTrees CvRTrees
-------- --------
.. ocv:class:: class CvRTrees : public CvStatModel .. ocv:class:: CvRTrees
Random trees. Random trees.
......
...@@ -97,7 +97,7 @@ CvStatModel::clear ...@@ -97,7 +97,7 @@ CvStatModel::clear
Deallocates memory and resets the model state. 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 .. index:: CvStatModel::save
...@@ -189,7 +189,7 @@ Usually, the previous model state is cleared by ``clear()`` before running the t ...@@ -189,7 +189,7 @@ Usually, the previous model state is cleared by ``clear()`` before running the t
CvStatModel::predict 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. Predicts the response for a sample.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment