mlpack::tree::split Namespace Reference

Functions

template
<
typename
MatType
,
typename
SplitType
>
size_t PerformSplit (MatType &data, const size_t begin, const size_t count, const typename SplitType::SplitInfo &splitInfo)
 This function implements the default split behavior i.e. More...

 
template
<
typename
MatType
,
typename
SplitType
>
size_t PerformSplit (MatType &data, const size_t begin, const size_t count, const typename SplitType::SplitInfo &splitInfo, std::vector< size_t > &oldFromNew)
 This function implements the default split behavior i.e. More...

 

Function Documentation

◆ PerformSplit() [1/2]

size_t mlpack::tree::split::PerformSplit ( MatType &  data,
const size_t  begin,
const size_t  count,
const typename SplitType::SplitInfo &  splitInfo 
)

This function implements the default split behavior i.e.

it rearranges points according to the split information. The SplitType::AssignToLeftNode() function is used in order to determine the child that contains any particular point.

Parameters
dataThe dataset used by the binary space tree.
beginIndex of the starting point in the dataset that belongs to this node.
countNumber of points in this node.
splitInfoThe information about the split.

Definition at line 36 of file perform_split.hpp.

References Log::Assert().

◆ PerformSplit() [2/2]

size_t mlpack::tree::split::PerformSplit ( MatType &  data,
const size_t  begin,
const size_t  count,
const typename SplitType::SplitInfo &  splitInfo,
std::vector< size_t > &  oldFromNew 
)

This function implements the default split behavior i.e.

it rearranges points according to the split information. The SplitType::AssignToLeftNode() function is used in order to determine the child that contains any particular point. The function takes care of indices and returns the list of changed indices.

Parameters
dataThe dataset used by the binary space tree.
beginIndex of the starting point in the dataset that belongs to this node.
countNumber of points in this node.
splitInfoThe information about the split.
oldFromNewVector which will be filled with the old positions for each new point.

Definition at line 101 of file perform_split.hpp.

References Log::Assert().