14 #ifndef MLPACK_METHODS_KMEANS_REFINED_START_HPP 15 #define MLPACK_METHODS_KMEANS_REFINED_START_HPP 59 template<
typename MatType>
60 void Cluster(
const MatType& data,
61 const size_t clusters,
62 arma::mat& centroids)
const;
75 template<
typename MatType>
76 void Cluster(
const MatType& data,
77 const size_t clusters,
78 arma::Row<size_t>& assignments)
const;
91 template<
typename Archive>
109 #include "refined_start_impl.hpp" size_t Samplings() const
Get the number of samplings that will be performed.
void Serialize(Archive &ar, const unsigned int)
Serialize the object.
Linear algebra utility functions, generally performed on matrices or vectors.
void Cluster(const MatType &data, const size_t clusters, arma::mat ¢roids) const
Partition the given dataset into the given number of clusters according to the random sampling scheme...
RefinedStart(const size_t samplings=100, const double percentage=0.02)
Create the RefinedStart object, optionally specifying parameters for the number of samplings to perfo...
The core includes that mlpack expects; standard C++ includes and Armadillo.
FirstShim< T > CreateNVP(T &t, const std::string &name, typename std::enable_if_t< HasSerialize< T >::value > *=0)
Call this function to produce a name-value pair; this is similar to BOOST_SERIALIZATION_NVP(), but should be used for types that have a Serialize() function (or contain a type that has a Serialize() function) instead of a serialize() function.
double & Percentage()
Modify the percentage of the data used by each subsampling.
double percentage
The percentage of the data to use for each subsampling.
double Percentage() const
Get the percentage of the data used by each subsampling.
size_t samplings
The number of samplings to perform.
A refined approach for choosing initial points for k-means clustering.
size_t & Samplings()
Modify the number of samplings that will be performed.