12 #ifndef MLPACK_METHODS_DECISION_TREE_MULTIPLE_RANDOM_DIMENSION_SPLIT_HPP 13 #define MLPACK_METHODS_DECISION_TREE_MULTIPLE_RANDOM_DIMENSION_SPLIT_HPP 32 numDimensions(numDimensions),
43 if (numDimensions == 0 || numDimensions > dimensions)
44 numDimensions = (size_t) std::sqrt(dimensions);
46 values.set_size(numDimensions + 1);
49 for (
size_t i = 0; i < numDimensions; ++i)
60 for (
size_t j = 0; j < i; ++j)
62 if (values[j] == value)
73 values[numDimensions] = std::numeric_limits<size_t>::max();
82 size_t End()
const {
return size_t(-1); }
101 arma::Col<size_t> values;
Linear algebra utility functions, generally performed on matrices or vectors.
This dimension selection policy allows the selection from a few random dimensions.
size_t & Dimensions()
Set the number of dimensions.
size_t Next()
Get the next index.
size_t Dimensions() const
Get the number of dimensions.
int RandInt(const int hiExclusive)
Generates a uniform random integer.
size_t End() const
Get the last random value.
size_t Begin()
Get the first random value.
MultipleRandomDimensionSelect(const size_t numDimensions=0)
Instantiate the MultipleRandomDimensionSelect object.