A binary space partitioning tree node is split into its left and right child.
More...
|
static bool | SplitNode (const BoundType &bound, MatType &data, const size_t begin, const size_t count, size_t &splitCol) |
| Split the node according to the mean value in the dimension with maximum width. More...
|
|
static bool | SplitNode (const BoundType &bound, MatType &data, const size_t begin, const size_t count, size_t &splitCol, std::vector< size_t > &oldFromNew) |
| Split the node according to the mean value in the dimension with maximum width and return a list of changed indices. More...
|
|
|
static size_t | PerformSplit (MatType &data, const size_t begin, const size_t count, const size_t splitDimension, const double splitVal) |
| Reorder the dataset into two parts such that they lie on either side of splitCol. More...
|
|
static size_t | PerformSplit (MatType &data, const size_t begin, const size_t count, const size_t splitDimension, const double splitVal, std::vector< size_t > &oldFromNew) |
| Reorder the dataset into two parts such that they lie on either side of splitCol. More...
|
|
template<typename BoundType, typename MatType = arma::mat>
class mlpack::tree::MidpointSplit< BoundType, MatType >
A binary space partitioning tree node is split into its left and right child.
The split is done in the dimension that has the maximum width. The points are divided into two parts based on the midpoint in this dimension.
Definition at line 31 of file midpoint_split.hpp.
◆ PerformSplit() [1/2]
template<typename BoundType , typename MatType = arma::mat>
static size_t mlpack::tree::MidpointSplit< BoundType, MatType >::PerformSplit |
( |
MatType & |
data, |
|
|
const size_t |
begin, |
|
|
const size_t |
count, |
|
|
const size_t |
splitDimension, |
|
|
const double |
splitVal |
|
) |
| |
|
staticprivate |
Reorder the dataset into two parts such that they lie on either side of splitCol.
- Parameters
-
data | The dataset used by the binary space tree. |
begin | Index of the starting point in the dataset that belongs to this node. |
count | Number of points in this node. |
splitDimension | The dimension to split the node on. |
splitVal | The split in dimension splitDimension is based on this value. |
◆ PerformSplit() [2/2]
template<typename BoundType , typename MatType = arma::mat>
static size_t mlpack::tree::MidpointSplit< BoundType, MatType >::PerformSplit |
( |
MatType & |
data, |
|
|
const size_t |
begin, |
|
|
const size_t |
count, |
|
|
const size_t |
splitDimension, |
|
|
const double |
splitVal, |
|
|
std::vector< size_t > & |
oldFromNew |
|
) |
| |
|
staticprivate |
Reorder the dataset into two parts such that they lie on either side of splitCol.
Also returns a list of changed indices.
- Parameters
-
data | The dataset used by the binary space tree. |
begin | Index of the starting point in the dataset that belongs to this node. |
count | Number of points in this node. |
splitDimension | The dimension to split the node on. |
splitVal | The split in dimension splitDimension is based on this value. |
oldFromNew | Vector which will be filled with the old positions for each new point. |
◆ SplitNode() [1/2]
template<typename BoundType , typename MatType = arma::mat>
static bool mlpack::tree::MidpointSplit< BoundType, MatType >::SplitNode |
( |
const BoundType & |
bound, |
|
|
MatType & |
data, |
|
|
const size_t |
begin, |
|
|
const size_t |
count, |
|
|
size_t & |
splitCol |
|
) |
| |
|
static |
Split the node according to the mean value in the dimension with maximum width.
- Parameters
-
bound | The bound used for this node. |
data | The dataset used by the binary space tree. |
begin | Index of the starting point in the dataset that belongs to this node. |
count | Number of points in this node. |
splitDimension | This will be filled with the dimension the node is to be split on. |
splitCol | The index at which the dataset is divided into two parts after the rearrangement. |
◆ SplitNode() [2/2]
template<typename BoundType , typename MatType = arma::mat>
static bool mlpack::tree::MidpointSplit< BoundType, MatType >::SplitNode |
( |
const BoundType & |
bound, |
|
|
MatType & |
data, |
|
|
const size_t |
begin, |
|
|
const size_t |
count, |
|
|
size_t & |
splitCol, |
|
|
std::vector< size_t > & |
oldFromNew |
|
) |
| |
|
static |
Split the node according to the mean value in the dimension with maximum width and return a list of changed indices.
- Parameters
-
bound | The bound used for this node. |
data | The dataset used by the binary space tree. |
begin | Index of the starting point in the dataset that belongs to this node. |
count | Number of points in this node. |
splitDimension | This will be filled with the dimension the node is to be split on. |
splitCol | The index at which the dataset is divided into two parts after the rearrangement. |
oldFromNew | Vector which will be filled with the old positions for each new point. |
The documentation for this class was generated from the following file: