13 #ifndef MLPACK_CORE_TREE_SPILL_TREE_MEAN_SPACE_SPLIT_IMPL_HPP 14 #define MLPACK_CORE_TREE_SPILL_TREE_MEAN_SPACE_SPLIT_IMPL_HPP 22 template<
typename MetricType,
typename MatType>
23 template<
typename HyperplaneType>
25 const typename HyperplaneType::BoundType& bound,
27 const arma::Col<size_t>& points,
30 typename HyperplaneType::ProjVectorType projVector;
34 projVector, midValue))
37 double splitVal = 0.0;
38 for (
size_t i = 0; i < points.n_elem; ++i)
39 splitVal += projVector.Project(data.col(points[i]));
40 splitVal /= points.n_elem;
42 hyp = HyperplaneType(projVector, splitVal);
static bool SplitSpace(const typename HyperplaneType::BoundType &bound, const MatType &data, const arma::Col< size_t > &points, HyperplaneType &hyp)
Create a splitting hyperplane considering the mean of the values in a certain projection.
Definition: mean_space_split_impl.hpp:24
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
Definition: space_split.hpp:23