mlpack  2.0.1
dt_utils.hpp
Go to the documentation of this file.
1 
15 #ifndef __MLPACK_METHODS_DET_DT_UTILS_HPP
16 #define __MLPACK_METHODS_DET_DT_UTILS_HPP
17 
18 #include <mlpack/core.hpp>
19 #include "dtree.hpp"
20 
21 namespace mlpack {
22 namespace det {
23 
35 void PrintLeafMembership(DTree* dtree,
36  const arma::mat& data,
37  const arma::Mat<size_t>& labels,
38  const size_t numClasses,
39  const std::string leafClassMembershipFile = "");
40 
49 void PrintVariableImportance(const DTree* dtree,
50  const std::string viFile = "");
51 
64 DTree* Trainer(arma::mat& dataset,
65  const size_t folds,
66  const bool useVolumeReg = false,
67  const size_t maxLeafSize = 10,
68  const size_t minLeafSize = 5,
69  const std::string unprunedTreeOutput = "");
70 
71 } // namespace det
72 } // namespace mlpack
73 
74 #endif // __MLPACK_METHODS_DET_DT_UTILS_HPP
Linear algebra utility functions, generally performed on matrices or vectors.
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...
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
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:46