A density estimation tree is similar to both a decision tree and a space partitioning tree (like a kd-tree).
More...
|
| DTree () |
| Create an empty density estimation tree. More...
|
|
| DTree (const arma::vec &maxVals, const arma::vec &minVals, const size_t totalPoints) |
| Create a density estimation tree with the given bounds and the given number of total points. More...
|
|
| DTree (arma::mat &data) |
| Create a density estimation tree on the given data. More...
|
|
| DTree (const arma::vec &maxVals, const arma::vec &minVals, const size_t start, const size_t end, const double logNegError) |
| Create a child node of a density estimation tree given the bounding box specified by maxVals and minVals, using the size given in start and end and the specified error. More...
|
|
| DTree (const arma::vec &maxVals, const arma::vec &minVals, const size_t totalPoints, const size_t start, const size_t end) |
| Create a child node of a density estimation tree given the bounding box specified by maxVals and minVals, using the size given in start and end, and calculating the error with the total number of points given. More...
|
|
| ~DTree () |
| Clean up memory allocated by the tree. More...
|
|
double | AlphaUpper () const |
| Return the upper part of the alpha sum. More...
|
|
double | ComputeValue (const arma::vec &query) const |
| Compute the logarithm of the density estimate of a given query point. More...
|
|
void | ComputeVariableImportance (arma::vec &importances) const |
| Compute the variable importance of each dimension in the learned tree. More...
|
|
size_t | End () const |
| Return the first index of a point not contained in this node. More...
|
|
int | FindBucket (const arma::vec &query) const |
| Return the tag of the leaf containing the query. More...
|
|
double | Grow (arma::mat &data, arma::Col< size_t > &oldFromNew, const bool useVolReg=false, const size_t maxLeafSize=10, const size_t minLeafSize=5) |
| Greedily expand the tree. More...
|
|
DTree * | Left () const |
| Return the left child. More...
|
|
double | LogNegativeError (const size_t totalPoints) const |
| Compute the log-negative-error for this point, given the total number of points in the dataset. More...
|
|
double | LogNegError () const |
| Return the log negative error of this node. More...
|
|
double | LogVolume () const |
| Return the inverse of the volume of this node. More...
|
|
const arma::vec & | MaxVals () const |
| Return the maximum values. More...
|
|
arma::vec & | MaxVals () |
| Modify the maximum values. More...
|
|
const arma::vec & | MinVals () const |
| Return the minimum values. More...
|
|
arma::vec & | MinVals () |
| Modify the minimum values. More...
|
|
double | PruneAndUpdate (const double oldAlpha, const size_t points, const bool useVolReg=false) |
| Perform alpha pruning on a tree. More...
|
|
double | Ratio () const |
| Return the ratio of points in this node to the points in the whole dataset. More...
|
|
DTree * | Right () const |
| Return the right child. More...
|
|
bool | Root () const |
| Return whether or not this is the root of the tree. More...
|
|
template<typename Archive > |
void | Serialize (Archive &ar, const unsigned int) |
| Serialize the density estimation tree. More...
|
|
size_t | SplitDim () const |
| Return the split dimension of this node. More...
|
|
double | SplitValue () const |
| Return the split value of this node. More...
|
|
size_t | Start () const |
| Return the starting index of points contained in this node. More...
|
|
size_t | SubtreeLeaves () const |
| Return the number of leaves which are descendants of this node. More...
|
|
double | SubtreeLeavesLogNegError () const |
| Return the log negative error of all descendants of this node. More...
|
|
int | TagTree (const int tag=0) |
| Index the buckets for possible usage later; this results in every leaf in the tree having a specific tag (accessible with BucketTag()). More...
|
|
bool | WithinRange (const arma::vec &query) const |
| Return whether a query point is within the range of this node. More...
|
|
void | WriteTree (FILE *fp, const size_t level=0) const |
| Print the tree in a depth-first manner (this function is called recursively). More...
|
|
A density estimation tree is similar to both a decision tree and a space partitioning tree (like a kd-tree).
Each leaf represents a constant-density hyper-rectangle. The tree is constructed in such a way as to minimize the integrated square error between the probability distribution of the tree and the observed probability distribution of the data. Because the tree is similar to a decision tree, the density estimation tree can provide very fast density estimates for a given point.
For more information, see the following paper:
* @incollection{ram2011,
* author = {Ram, Parikshit and Gray, Alexander G.},
* booktitle = {{Proceedings of the 17th ACM SIGKDD International Conference
* on Knowledge Discovery and Data Mining}},
* series = {KDD '11},
* year = {2011},
* pages = {627--635}
* }
*
Definition at line 44 of file dtree.hpp.