CUV  0.9.201304091348
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions
Kmeans
special purpose functions

Utility functions for k-means clustering. More...

Collaboration diagram for Kmeans:

Functions

template<class __data_value_type , class __memory_space_type , class __memory_layout_type >
void cuv::libs::kmeans::compute_clusters (cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &clusters, const cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &data, const cuv::tensor< typename cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type >::index_type, __memory_space_type > &indices)
 Compute the new cluster centers in one step.
template<class __data_value_type , class __memory_space_type , class __memory_layout_type >
void cuv::libs::kmeans::sort_by_index (cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &res, cuv::tensor< typename cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type >::index_type, __memory_space_type > &indices, const cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &data)
 Sort the dataset according to the indices.

Detailed Description

Utility functions for k-means clustering.

Function Documentation

template<class __data_value_type , class __memory_space_type , class __memory_layout_type >
void cuv::libs::kmeans::compute_clusters ( cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &  clusters,
const cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &  data,
const cuv::tensor< typename cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type >::index_type, __memory_space_type > &  indices 
)

Compute the new cluster centers in one step.

Parameters
clustersthe means to be updated
datathe data of from which the means are computed
indicesfor every datapoint the index of the closest mean
template<class __data_value_type , class __memory_space_type , class __memory_layout_type >
void cuv::libs::kmeans::sort_by_index ( cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &  res,
cuv::tensor< typename cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type >::index_type, __memory_space_type > &  indices,
const cuv::tensor< __data_value_type, __memory_space_type, __memory_layout_type > &  data 
)

Sort the dataset according to the indices.

Parameters
resspace for the sorted data
datathe data which is to be sorted
indicesfor every datapoint the index of the closest mean