mlpack  2.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 void PrintLeafMembership(DTree* dtree,
34  const arma::mat& data,
35  const arma::Mat<size_t>& labels,
36  const size_t numClasses,
37  const std::string leafClassMembershipFile = "");
38 
47 void PrintVariableImportance(const DTree* dtree,
48  const std::string viFile = "");
49 
62 DTree* Trainer(arma::mat& dataset,
63  const size_t folds,
64  const bool useVolumeReg = false,
65  const size_t maxLeafSize = 10,
66  const size_t minLeafSize = 5,
67  const std::string unprunedTreeOutput = "");
68 
69 } // namespace det
70 } // namespace mlpack
71 
72 #endif // MLPACK_METHODS_DET_DT_UTILS_HPP
void PrintLeafMembership(DTree *dtree, const arma::mat &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...
The core includes that mlpack expects; standard C++ includes and Armadillo.
void PrintVariableImportance(const DTree *dtree, const std::string viFile="")
Print the variable importance of each dimension of a density estimation tree.
DTree * Trainer(arma::mat &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.
A density estimation tree is similar to both a decision tree and a space partitioning tree (like a kd...
Definition: dtree.hpp:44