MLPACK  1.0.11
dt_utils.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_METHODS_DET_DT_UTILS_HPP
24 #define __MLPACK_METHODS_DET_DT_UTILS_HPP
25 
26 #include <mlpack/core.hpp>
27 #include "dtree.hpp"
28 
29 namespace mlpack {
30 namespace det {
31 
43 void PrintLeafMembership(DTree* dtree,
44  const arma::mat& data,
45  const arma::Mat<size_t>& labels,
46  const size_t numClasses,
47  const std::string leafClassMembershipFile = "");
48 
57 void PrintVariableImportance(const DTree* dtree,
58  const std::string viFile = "");
59 
72 DTree* Trainer(arma::mat& dataset,
73  const size_t folds,
74  const bool useVolumeReg = false,
75  const size_t maxLeafSize = 10,
76  const size_t minLeafSize = 5,
77  const std::string unprunedTreeOutput = "");
78 
79 }; // namespace det
80 }; // namespace mlpack
81 
82 #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...
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:54