Hierarchical integer K-Means clustering. More...


Go to the source code of this file.
Classes | |
| struct | _VlHIKMNode |
| HIKM tree node. More... | |
| struct | _VlHIKMTree |
| HIKM tree. More... | |
Typedefs | |
| typedef struct _VlHIKMNode | VlHIKMNode |
| HIKM tree node. | |
| typedef struct _VlHIKMTree | VlHIKMTree |
| HIKM tree. | |
Functions | |
Create and destroy | |
| VL_EXPORT VlHIKMTree * | vl_hikm_new (int method) |
| New HIKM tree. | |
| VL_EXPORT void | vl_hikm_delete (VlHIKMTree *f) |
| Delete HIKM tree. | |
Retrieve data and parameters | |
| VL_EXPORT vl_size | vl_hikm_get_ndims (VlHIKMTree const *f) |
| Get data dimensionality. | |
| VL_EXPORT vl_size | vl_hikm_get_K (VlHIKMTree const *f) |
| Get K. | |
| VL_EXPORT vl_size | vl_hikm_get_depth (VlHIKMTree const *f) |
| Get depth. | |
| VL_EXPORT int | vl_hikm_get_verbosity (VlHIKMTree const *f) |
| Get verbosity level. | |
| VL_EXPORT vl_size | vl_hikm_get_max_niters (VlHIKMTree const *f) |
| Get maximum number of iterations. | |
| VL_EXPORT VlHIKMNode const * | vl_hikm_get_root (VlHIKMTree const *f) |
| Get maximum number of iterations. | |
Set parameters | |
| VL_EXPORT void | vl_hikm_set_verbosity (VlHIKMTree *f, int verb) |
| Set verbosity level. | |
| VL_EXPORT void | vl_hikm_set_max_niters (VlHIKMTree *f, int max_niters) |
| Set maximum number of iterations. | |
Process data | |
| VL_EXPORT void | vl_hikm_init (VlHIKMTree *f, vl_size M, vl_size K, vl_size depth) |
| Initialize HIKM tree. | |
| VL_EXPORT void | vl_hikm_train (VlHIKMTree *f, vl_uint8 const *data, vl_size N) |
| Train HIKM tree. | |
| VL_EXPORT void | vl_hikm_push (VlHIKMTree *f, vl_uint32 *asgn, vl_uint8 const *data, vl_size N) |
| Project data down HIKM tree. | |
Hierarchical integer K-Means clustering.
Hierarchical Integer K-Means Clustering.
Hierarchical integer K-Means clustering (HIKM) is a simple hierarchical version of integer K-Means (IKM). The algorithm recursively applies integer K-means to create more refined partitions of the data.
Create a tree with vl_hikm_new() and delete it with vl_hikm_delete(). Use vl_hikm_train() to build the tree from training data and vl_hikm_push() to project new data down a HIKM tree.
The HIKM tree is represented by a VlHIKMTree structure, which contains a tree composed of VlHIKMNode. Each node is an integer K-means filter which partitions the data into K clusters.
Definition in file hikmeans.h.
| typedef struct _VlHIKMNode VlHIKMNode |
HIKM tree node.
The number of children K is not bigger than the K parameter of the HIKM tree.
| typedef struct _VlHIKMTree VlHIKMTree |
HIKM tree.
| VL_EXPORT void vl_hikm_delete | ( | VlHIKMTree * | f | ) |
Delete HIKM tree.
------------------------------------------------------------------
| f | HIKM tree. |
Definition at line 197 of file hikmeans.c.
| VL_EXPORT vl_size vl_hikm_get_depth | ( | VlHIKMTree const * | f | ) |
| VL_EXPORT vl_size vl_hikm_get_K | ( | VlHIKMTree const * | f | ) |
| VL_EXPORT vl_size vl_hikm_get_max_niters | ( | VlHIKMTree const * | f | ) |
Get maximum number of iterations.
| f | HIKM tree. |
Definition at line 335 of file hikmeans.c.
| VL_EXPORT vl_size vl_hikm_get_ndims | ( | VlHIKMTree const * | f | ) |
Get data dimensionality.
| f | HIKM tree. |
Definition at line 290 of file hikmeans.c.
| VL_EXPORT VlHIKMNode const* vl_hikm_get_root | ( | VlHIKMTree const * | f | ) |
Get maximum number of iterations.
| f | HIKM tree. |
Definition at line 346 of file hikmeans.c.
| VL_EXPORT int vl_hikm_get_verbosity | ( | VlHIKMTree const * | f | ) |
Get verbosity level.
| f | HIKM tree. |
Definition at line 324 of file hikmeans.c.
| VL_EXPORT void vl_hikm_init | ( | VlHIKMTree * | f, |
| vl_size | M, | ||
| vl_size | K, | ||
| vl_size | depth | ||
| ) |
Initialize HIKM tree.
------------------------------------------------------------------
| f | HIKM tree. |
| M | Data dimensionality. |
| K | Number of clusters per node. |
| depth | Tree depth. |
Definition at line 217 of file hikmeans.c.
| VL_EXPORT VlHIKMTree* vl_hikm_new | ( | int | method | ) |
New HIKM tree.
------------------------------------------------------------------
| method | clustering method. |
Definition at line 183 of file hikmeans.c.
| VL_EXPORT void vl_hikm_push | ( | VlHIKMTree * | f, |
| vl_uint32 * | asgn, | ||
| vl_uint8 const * | data, | ||
| vl_size | N | ||
| ) |
Project data down HIKM tree.
------------------------------------------------------------------
| f | HIKM tree. |
| asgn | Path down the tree (out). |
| data | Data to project. |
| N | Number of data. |
The function writes to asgn the path of the data data down the HIKM tree f. The parameter asgn must point to an array of M by N elements, where M is the depth of the HIKM tree and N is the number of data point to process.
Definition at line 257 of file hikmeans.c.
| VL_EXPORT void vl_hikm_set_max_niters | ( | VlHIKMTree * | f, |
| int | max_niters | ||
| ) |
Set maximum number of iterations.
| f | HIKM tree. |
| max_niters | maximum number of iterations. |
Definition at line 368 of file hikmeans.c.
| VL_EXPORT void vl_hikm_set_verbosity | ( | VlHIKMTree * | f, |
| int | verb | ||
| ) |
Set verbosity level.
| f | HIKM tree. |
| verb | verbosity level. |
Definition at line 357 of file hikmeans.c.
| VL_EXPORT void vl_hikm_train | ( | VlHIKMTree * | f, |
| vl_uint8 const * | data, | ||
| vl_size | N | ||
| ) |
Train HIKM tree.
------------------------------------------------------------------
| f | HIKM tree. |
| data | Data to cluster. |
| N | Number of data. |
Definition at line 238 of file hikmeans.c.