43 m_bandwidth=bandwidth;
45 m_leaf_size=leaf_size;
59 REQUIRE(data,
"Data not supplied\n")
67 tree=
new CKDTree(m_leaf_size,m_dist);
77 tree=
new CKDTree(m_leaf_size,m_dist);
87 SG_ERROR(
"Evaluation mode not recognized\n");
97 REQUIRE(test,
"data not supplied\n")
104 query_tree=
new CKDTree(leaf_size,m_dist);
106 query_tree=
new CBallTree(leaf_size,m_dist);
108 SG_ERROR(
"Evaluation mode not identified\n");
116 SG_ERROR(
"Query tree root not found!\n")
151 void CKernelDensity::init()
SGVector< float64_t > get_log_density(CDenseFeatures< float64_t > *test, int32_t leaf_size=1)
The node of the tree structure forming a TreeMachine The node contains pointer to its parent and poin...
virtual float64_t get_log_likelihood_example(int32_t num_example)
SGVector< index_t > get_rearranged_vector_ids() const
SGMatrix< ST > get_feature_matrix()
This class implements Ball tree. The ball tree is contructed using the top-down approach. cf. ftp://ftp.icsi.berkeley.edu/pub/techreports/1989/tr-89-063.pdf.
#define SG_NOTIMPLEMENTED
CTreeMachineNode< T > * get_root()
virtual float64_t get_log_derivative(int32_t num_param, int32_t num_example)
Base class Distribution from which all methods implementing a distribution are derived.
void build_tree(CDenseFeatures< float64_t > *data)
Class SGObject is the base class of all shogun objects.
CKernelDensity(float64_t bandwidth=1.0, EKernelType kernel_type=K_GAUSSIAN, EDistanceType dist=D_EUCLIDEAN, EEvaluationMode eval=EM_BALLTREE_SINGLE, int32_t leaf_size=1, float64_t atol=0, float64_t rtol=0)
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...
This class implements KD-Tree. cf. http://www.autonlab.org/autonweb/14665/version/2/part/5/data/moore...
virtual bool train(CFeatures *data=NULL)
virtual int32_t get_num_model_parameters()
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
static CDenseFeatures * obtain_from_generic(CFeatures *const base_features)
virtual float64_t get_log_model_parameter(int32_t num_param)