mlpack
Classes | Namespaces | Functions
kmeans_impl.hpp File Reference
#include "kmeans.hpp"
#include <mlpack/core/metrics/lmetric.hpp>
#include <mlpack/core/util/sfinae_utility.hpp>
Include dependency graph for kmeans_impl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mlpack::kmeans::GivesCentroids< InitialPartitionPolicy >
 'value' is true if the InitialPartitionPolicy class has a member Cluster(const arma::mat& data, const size_t clusters, arma::mat& centroids). More...
 

Namespaces

 mlpack
 Linear algebra utility functions, generally performed on matrices or vectors.
 
 mlpack::kmeans
 K-Means clustering.
 

Functions

 mlpack::kmeans::HAS_MEM_FUNC (Cluster, GivesCentroidsCheck)
 This gives us a GivesCentroids object that we can use to tell whether or not an InitialPartitionPolicy returns centroids or point assignments.
 
template<typename MatType , typename InitialPartitionPolicy >
bool mlpack::kmeans::GetInitialAssignmentsOrCentroids (InitialPartitionPolicy &ipp, const MatType &data, const size_t clusters, arma::Row< size_t > &assignments, arma::mat &, const typename std::enable_if_t< !GivesCentroids< InitialPartitionPolicy >::value > *=0)
 Call the initial partition policy, if it returns assignments. More...
 
template<typename MatType , typename InitialPartitionPolicy >
bool mlpack::kmeans::GetInitialAssignmentsOrCentroids (InitialPartitionPolicy &ipp, const MatType &data, const size_t clusters, arma::Row< size_t > &, arma::mat &centroids, const typename std::enable_if_t< GivesCentroids< InitialPartitionPolicy >::value > *=0)
 Call the initial partition policy, if it returns centroids. More...
 

Detailed Description

Author
Parikshit Ram (pram@.nosp@m.cc.g.nosp@m.atech.nosp@m..edu)
Ryan Curtin

Implementation for the K-means method for getting an initial point.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.