#include "generic.h"
#include "ikmeans.h"
Go to the source code of this file.
Data Structures | |
struct | _VlHIKMNode |
HIKM tree node. More... | |
struct | _VlHIKMTree |
HIKM tree. More... | |
Functions | |
Create and destroy | |
VlHIKMTree * | vl_hikm_new (int method) |
New HIKM tree. | |
void | vl_hikm_delete (VlHIKMTree *f) |
Delete HIKM tree. | |
Retrieve data and parameters | |
VL_INLINE int | vl_hikm_get_ndims (VlHIKMTree const *f) |
Get data dimensionality. | |
VL_INLINE int | vl_hikm_get_K (VlHIKMTree const *f) |
Get K. | |
VL_INLINE int | vl_hikm_get_depth (VlHIKMTree const *f) |
Get depth. | |
VL_INLINE int | vl_hikm_get_verbosity (VlHIKMTree const *f) |
Get verbosity level. | |
VL_INLINE int | vl_hikm_get_max_niters (VlHIKMTree const *f) |
Get maximum number of iterations. | |
VL_INLINE VlHIKMNode const * | vl_hikm_get_root (VlHIKMTree const *f) |
Get maximum number of iterations. | |
Set parameters | |
VL_INLINE void | vl_hikm_set_verbosity (VlHIKMTree *f, int verb) |
Set verbosity level. | |
VL_INLINE void | vl_hikm_set_max_niters (VlHIKMTree *f, int max_niters) |
Set maximum number of iterations. | |
Process data | |
void | vl_hikm_init (VlHIKMTree *f, int M, int K, int depth) |
Initialize HIKM tree. | |
void | vl_hikm_train (VlHIKMTree *f, vl_ikm_data const *data, int N) |
Train HIKM tree. | |
void | vl_hikm_push (VlHIKMTree *f, vl_uint *asgn, vl_ikm_data const *data, int N) |
Project data down HIKM tree. |
Hierarichial integer K-Means clustering (HIKM) is a simple hierarchical version of integer K-Means (IKM). The algorithm recusrively apply integer K-means to create more refined partitions of the data.
Use the vl_hikm() function to partition the data and create a HIKM tree (and vl_hikm_delete() to dispose of it). Use vl_hikm_push() to project new data down a HIKM tree.
void vl_hikm_delete | ( | VlHIKMTree * | f | ) |
f | HIKM tree. |
VL_INLINE int vl_hikm_get_depth | ( | VlHIKMTree const * | f | ) |
f | HIKM tree. |
VL_INLINE int vl_hikm_get_K | ( | VlHIKMTree const * | f | ) |
f | HIKM tree. |
VL_INLINE int vl_hikm_get_max_niters | ( | VlHIKMTree const * | f | ) |
f | HIKM tree. |
VL_INLINE int vl_hikm_get_ndims | ( | VlHIKMTree const * | f | ) |
f | HIKM tree. |
VL_INLINE VlHIKMNode const * vl_hikm_get_root | ( | VlHIKMTree const * | f | ) |
f | HIKM tree. |
VL_INLINE int vl_hikm_get_verbosity | ( | VlHIKMTree const * | f | ) |
f | HIKM tree. |
void vl_hikm_init | ( | VlHIKMTree * | f, | |
int | M, | |||
int | K, | |||
int | depth | |||
) |
f | HIKM tree. | |
M | Data dimensionality. | |
K | Number of clusters per node. | |
depth | Tree depth. |
VlHIKMTree* vl_hikm_new | ( | int | method | ) |
method | clustering method. |
void vl_hikm_push | ( | VlHIKMTree * | f, | |
vl_uint * | asgn, | |||
vl_ikm_data const * | data, | |||
int | N | |||
) |
f | HIKM tree. | |
asgn | Path down the tree (out). | |
data | Data to project. | |
N | Number of data. |
M
by N
elements, where M
is the depth of the HIKM tree and N
is the number of data point to process.
VL_INLINE void vl_hikm_set_max_niters | ( | VlHIKMTree * | f, | |
int | max_niters | |||
) |
f | HIKM tree. | |
max_niters | maximum number of iterations. |
VL_INLINE void vl_hikm_set_verbosity | ( | VlHIKMTree * | f, | |
int | verb | |||
) |
f | HIKM tree. | |
verb | verbosity level. |
void vl_hikm_train | ( | VlHIKMTree * | f, | |
vl_ikm_data const * | data, | |||
int | N | |||
) |
f | HIKM tree. | |
data | Data to cluster. | |
N | Number of data. |