Integer K-Means clustering - Definition. More...
#include "ikmeans.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "assert.h"
#include "ikmeans_init.tc"
#include "ikmeans_lloyd.tc"
#include "ikmeans_elkan.tc"
Go to the source code of this file.
Functions | |
void | vl_ikm_delete (VlIKMFilt *f) |
Delete IKM quantizer. | |
vl_ikmacc_t const * | vl_ikm_get_centers (VlIKMFilt const *f) |
Get maximum number of iterations. | |
vl_size | vl_ikm_get_K (VlIKMFilt const *f) |
Get the number of centers K. | |
vl_size | vl_ikm_get_max_niters (VlIKMFilt const *f) |
Get maximum number of iterations. | |
vl_size | vl_ikm_get_ndims (VlIKMFilt const *f) |
Get data dimensionality. | |
int | vl_ikm_get_verbosity (VlIKMFilt const *f) |
Get verbosity level. | |
static void | vl_ikm_init_elkan (VlIKMFilt *) |
static void | vl_ikm_init_lloyd (VlIKMFilt *) |
VlIKMFilt * | vl_ikm_new (int method) |
Create a new IKM quantizer. | |
void | vl_ikm_push (VlIKMFilt *f, vl_uint32 *asgn, vl_uint8 const *data, vl_size N) |
Project data to clusters. | |
static void | vl_ikm_push_elkan (VlIKMFilt *, vl_uint32 *, vl_uint8 const *, vl_size) |
static void | vl_ikm_push_lloyd (VlIKMFilt *, vl_uint32 *, vl_uint8 const *, vl_size) |
vl_uint32 | vl_ikm_push_one (vl_ikmacc_t const *centers, vl_uint8 const *data, vl_size M, vl_size K) |
Project one datum to clusters. | |
void | vl_ikm_set_max_niters (VlIKMFilt *f, vl_size max_niters) |
Set maximum number of iterations. | |
void | vl_ikm_set_verbosity (VlIKMFilt *f, int verb) |
Set verbosity level. | |
int | vl_ikm_train (VlIKMFilt *f, vl_uint8 const *data, vl_size N) |
Train clusters. | |
static int | vl_ikm_train_elkan (VlIKMFilt *, vl_uint8 const *, vl_size) |
static int | vl_ikm_train_lloyd (VlIKMFilt *, vl_uint8 const *, vl_size) |
Integer K-Means clustering - Definition.
Definition in file ikmeans.c.
void vl_ikm_delete | ( | VlIKMFilt * | f | ) |
vl_ikmacc_t const* vl_ikm_get_centers | ( | VlIKMFilt const * | f | ) |
vl_size vl_ikm_get_K | ( | VlIKMFilt const * | f | ) |
vl_size vl_ikm_get_max_niters | ( | VlIKMFilt const * | f | ) |
vl_size vl_ikm_get_ndims | ( | VlIKMFilt const * | f | ) |
int vl_ikm_get_verbosity | ( | VlIKMFilt const * | f | ) |
static void vl_ikm_init_elkan | ( | VlIKMFilt * | ) | [static] |
static void vl_ikm_init_lloyd | ( | VlIKMFilt * | ) | [static] |
VlIKMFilt* vl_ikm_new | ( | int | method | ) |
Create a new IKM quantizer.
method | Clustering algorithm. |
The function allocates initializes a new IKM quantizer to operate based algorithm method.
method has values in the enumerations VlIKMAlgorithms.
Project data to clusters.
f | IKM quantizer. |
asgn | Assignments (out). |
data | data. |
N | number of data (N >= 1). |
The function projects the data data on the integer K-means clusters specified by the IKM quantizer f. Notice that the quantizer must be initialized.
vl_uint32 vl_ikm_push_one | ( | vl_ikmacc_t const * | centers, |
vl_uint8 const * | data, | ||
vl_size | M, | ||
vl_size | K | ||
) |
void vl_ikm_set_max_niters | ( | VlIKMFilt * | f, |
vl_size | max_niters | ||
) |
void vl_ikm_set_verbosity | ( | VlIKMFilt * | f, |
int | verb | ||
) |
int vl_ikm_train | ( | VlIKMFilt * | f, |
vl_uint8 const * | data, | ||
vl_size | N | ||
) |
static int vl_ikm_train_elkan | ( | VlIKMFilt * | , |
vl_uint8 const * | , | ||
vl_size | |||
) | [static] |
static int vl_ikm_train_lloyd | ( | VlIKMFilt * | , |
vl_uint8 const * | , | ||
vl_size | |||
) | [static] |