32 #ifndef _NBODYTREE_H__
33 #define _NBODYTREE_H__
67 virtual const char*
get_name()
const {
return "NbodyTree"; }
201 SG_ERROR(
"distance metric not recognized\n");
virtual const char * get_name() const
The node of the tree structure forming a TreeMachine The node contains pointer to its parent and poin...
SGVector< index_t > get_rearranged_vector_ids() const
SGMatrix< index_t > get_knn_indices()
static const float64_t INFTY
infinity
float64_t distance(index_t vec, float64_t *arr, int32_t dim)
float64_t add_dim_dist(float64_t d)
void build_tree(CDenseFeatures< float64_t > *data)
SGMatrix< float64_t > m_data
virtual float64_t max_dist_dual(bnode_t *nodeq, bnode_t *noder)=0
CNbodyTree(int32_t leaf_size=1, EDistanceType d=D_EUCLIDEAN)
SGMatrix< float64_t > get_knn_dists()
virtual float64_t min_dist(bnode_t *node, float64_t *feat, int32_t dim)=0
void query_knn(CDenseFeatures< float64_t > *data, int32_t k)
SGVector< float64_t > log_kernel_density_dual(SGMatrix< float64_t > test, SGVector< index_t > qid, bnode_t *qroot, EKernelType kernel, float64_t h, float64_t atol, float64_t rtol)
SGVector< float64_t > log_kernel_density(SGMatrix< float64_t > test, EKernelType kernel, float64_t h, float64_t atol, float64_t rtol)
This class implements genaralized tree for N-body problems like k-NN, kernel density estimation...
float64_t actual_dists(float64_t dists)
virtual float64_t min_dist_dual(bnode_t *nodeq, bnode_t *noder)=0
all of classes and functions are contained in the shogun namespace
virtual void min_max_dist(float64_t *pt, bnode_t *node, float64_t &lower, float64_t &upper, int32_t dim)=0
SGVector< index_t > m_vec_id
static float64_t exp(float64_t x)
static float64_t log(float64_t v)
class TreeMachine, a base class for tree based multiclass classifiers. This class is derived from CBa...
virtual void init_node(bnode_t *node, index_t start, index_t end)=0
static float32_t sqrt(float32_t x)
This class implements a specialized version of max heap structure. This heap specializes in storing t...