Density Estimation With Density Estimation Trees

>>> from mlpack import det

This program performs a number of functions related to Density Estimation Trees. The optimal Density Estimation Tree (DET) can be trained on a set of data (specified by 'training') using cross-validation (with number of folds specified with the 'folds' parameter). This trained density estimation tree may then be saved with the 'output_model' output parameter.

The variable importances (that is, the feature importance values for each dimension) may be saved with the 'vi' output parameter, and the density estimates for each training point may be saved with the 'training_set_estimates' output parameter.

Enabling path printing for each node outputs the path from the root node to a leaf for each entry in the test set, or training set (if a test set is not provided). Strings like 'LRLRLR' (indicating that traversal went to the left child, then the right child, then the left child, and so forth) will be output. If 'lr-id' or 'id-lr' are given as the 'path_format' parameter, then the ID (tag) of every node along the path will be printed after or before the L or R character indicating the direction of traversal, respectively.

This program also can provide density estimates for a set of test points, specified in the 'test' parameter. The density estimation tree used for this task will be the tree that was trained on the given training points, or a tree given as the parameter 'input_model'. The density estimates for the test points may be saved using the 'test_set_estimates' output parameter.

input options

output options

The return value from the binding is a dict containing the following elements: