The MinimalSplitsNumberSweep class finds a partition along which we can split a node according to the number of required splits of the node.
More...
#include <minimal_splits_number_sweep.hpp>
|
template<typename TreeType > |
static size_t | SweepNonLeafNode (const size_t axis, const TreeType *node, typename TreeType::ElemType &axisCut) |
| Find a suitable partition of a non-leaf node along the provided axis. More...
|
|
template<typename TreeType > |
static size_t | SweepLeafNode (const size_t axis, const TreeType *node, typename TreeType::ElemType &axisCut) |
| Find a suitable partition of a leaf node along the provided axis. More...
|
|
template<typename SplitPolicy>
class mlpack::tree::MinimalSplitsNumberSweep< SplitPolicy >
The MinimalSplitsNumberSweep class finds a partition along which we can split a node according to the number of required splits of the node.
The class finds a partition along a given axis. Moreover, the class evaluates the cost of each split. The cost is proportional to the number of required splits and the difference of sizes of resulting nodes. If the resulting nodes are overflowed the maximum cost is returned.
- Template Parameters
-
SplitPolicy | The class that provides rules for inserting children of a node that is being split into two new subtrees. |
◆ SweepLeafNode()
template<typename SplitPolicy >
template<typename TreeType >
Find a suitable partition of a leaf node along the provided axis.
The method returns the cost of the split.
- Parameters
-
axis | The axis along which we are finding a partition. |
node | The node that is being split. |
axisCut | The coordinate at which the node may be split. |
◆ SweepNonLeafNode()
template<typename SplitPolicy >
template<typename TreeType >
Find a suitable partition of a non-leaf node along the provided axis.
The method returns the cost of the split.
- Parameters
-
axis | The axis along which we are finding a partition. |
node | The node that is being split. |
axisCut | The coordinate at which the node may be split. |
The documentation for this class was generated from the following files: