mlpack  master
dt_utils.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_METHODS_DET_DT_UTILS_HPP
14 #define MLPACK_METHODS_DET_DT_UTILS_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 #include "dtree.hpp"
18 
19 namespace mlpack {
20 namespace det {
21 
33 template <typename MatType, typename TagType>
35  const MatType& data,
36  const arma::Mat<size_t>& labels,
37  const size_t numClasses,
38  const std::string leafClassMembershipFile = "");
39 
48 template <typename MatType, typename TagType>
50  const std::string viFile = "");
51 
64 template <typename MatType, typename TagType>
65 DTree<MatType, TagType>* Trainer(MatType& dataset,
66  const size_t folds,
67  const bool useVolumeReg = false,
68  const size_t maxLeafSize = 10,
69  const size_t minLeafSize = 5,
70  const std::string unprunedTreeOutput = "");
71 
72 } // namespace det
73 } // namespace mlpack
74 
75 #include "dt_utils_impl.hpp"
76 
77 #endif // MLPACK_METHODS_DET_DT_UTILS_HPP
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
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...
Definition: dtree.hpp:46
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"$
Definition: CMakeLists.txt:18
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.