13 #ifndef MLPACK_METHODS_DET_DT_UTILS_HPP 14 #define MLPACK_METHODS_DET_DT_UTILS_HPP 33 template <
typename MatType,
typename TagType>
36 const arma::Mat<size_t>& labels,
37 const size_t numClasses,
48 template <
typename MatType,
typename TagType>
64 template <
typename MatType,
typename TagType>
67 const bool useVolumeReg =
false,
68 const size_t maxLeafSize = 10,
69 const size_t minLeafSize = 5,
75 #include "dt_utils_impl.hpp" 77 #endif // MLPACK_METHODS_DET_DT_UTILS_HPP Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void PrintLeafMembership(DTree< MatType, TagType > *dtree, const MatType &data, const arma::Mat< size_t > &labels, const size_t numClasses, const std::string leafClassMembershipFile="")
Print the membership of leaves of a density estimation tree given the labels and number of classes...
A density estimation tree is similar to both a decision tree and a space partitioning tree (like a kd...
test cpp RESULT_VARIABLE MEX_RESULT_TRASH OUTPUT_VARIABLE MEX_OUTPUT ERROR_VARIABLE MEX_ERROR_TRASH string(REGEX MATCH"Warning: You are using"MEX_WARNING"${MEX_OUTPUT}") if(MEX_WARNING) string(REGEX REPLACE".*using [a-zA-Z]* version \"([0-9.]*)[^\"]*\".*""\\1"OTHER_COMPILER_VERSION"$
void PrintVariableImportance(const DTree< MatType, TagType > *dtree, const std::string viFile="")
Print the variable importance of each dimension of a density estimation tree.
DTree< MatType, TagType > * Trainer(MatType &dataset, const size_t folds, const bool useVolumeReg=false, const size_t maxLeafSize=10, const size_t minLeafSize=5, const std::string unprunedTreeOutput="")
Train the optimal decision tree using cross-validation with the given number of folds.