\section{Refined\+Start Class Reference}
\label{classmlpack_1_1kmeans_1_1RefinedStart}\index{Refined\+Start@{Refined\+Start}}


A refined approach for choosing initial points for k-\/means clustering.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Refined\+Start} (const size\+\_\+t samplings=100, const double percentage=0.\+02)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Refined\+Start}{p.}{classmlpack_1_1kmeans_1_1RefinedStart} object, optionally specifying parameters for the number of samplings to perform and the percentage of the dataset to use in each sampling. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Cluster} (const Mat\+Type \&data, const size\+\_\+t clusters, arma\+::mat \&centroids) const
\begin{DoxyCompactList}\small\item\em Partition the given dataset into the given number of clusters according to the random sampling scheme outlined in Bradley and Fayyad\textquotesingle{}s paper, and return centroids. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Cluster} (const Mat\+Type \&data, const size\+\_\+t clusters, arma\+::\+Row$<$ size\+\_\+t $>$ \&assignments) const
\begin{DoxyCompactList}\small\item\em Partition the given dataset into the given number of clusters according to the random sampling scheme outlined in Bradley and Fayyad\textquotesingle{}s paper, and return point assignments. \end{DoxyCompactList}\item 
double \textbf{ Percentage} () const
\begin{DoxyCompactList}\small\item\em Get the percentage of the data used by each subsampling. \end{DoxyCompactList}\item 
double \& \textbf{ Percentage} ()
\begin{DoxyCompactList}\small\item\em Modify the percentage of the data used by each subsampling. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Samplings} () const
\begin{DoxyCompactList}\small\item\em Get the number of samplings that will be performed. \end{DoxyCompactList}\item 
size\+\_\+t \& \textbf{ Samplings} ()
\begin{DoxyCompactList}\small\item\em Modify the number of samplings that will be performed. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A refined approach for choosing initial points for k-\/means clustering. 

This approach runs k-\/means several times on random subsets of the data, and then clusters those solutions to select refined initial cluster assignments. It is an implementation of the following paper\+:

\{bradley1998refining, title=\{Refining initial points for k-\/means clustering\}, author=\{Bradley, Paul S and Fayyad, Usama M\}, booktitle=\{Proceedings of the Fifteenth International Conference on Machine Learning (I\+C\+ML 1998)\}, volume=\{66\}, year=\{1998\} \} 

Definition at line 37 of file refined\+\_\+start.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_a48edc64d074ae194a1c1cad975a05ae1}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Refined\+Start@{Refined\+Start}}
\index{Refined\+Start@{Refined\+Start}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Refined\+Start()}
{\footnotesize\ttfamily \textbf{ Refined\+Start} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{samplings = {\ttfamily 100},  }\item[{const double}]{percentage = {\ttfamily 0.02} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Create the \doxyref{Refined\+Start}{p.}{classmlpack_1_1kmeans_1_1RefinedStart} object, optionally specifying parameters for the number of samplings to perform and the percentage of the dataset to use in each sampling. 



Definition at line 45 of file refined\+\_\+start.\+hpp.



References Refined\+Start\+::\+Cluster().



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_abfcf87684e847573cafa7308df8556d6}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Cluster@{Cluster}}
\index{Cluster@{Cluster}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Cluster()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void Cluster (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{data,  }\item[{const size\+\_\+t}]{clusters,  }\item[{arma\+::mat \&}]{centroids }\end{DoxyParamCaption}) const}



Partition the given dataset into the given number of clusters according to the random sampling scheme outlined in Bradley and Fayyad\textquotesingle{}s paper, and return centroids. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Mat\+Type} & Type of data (arma\+::mat or arma\+::sp\+\_\+mat). \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em data} & Dataset to partition. \\
\hline
{\em clusters} & Number of clusters to split dataset into. \\
\hline
{\em centroids} & Matrix to store centroids into. \\
\hline
\end{DoxyParams}


Referenced by Refined\+Start\+::\+Refined\+Start().

\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_a7966edf99e192d87b200fd1bb6221fd7}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Cluster@{Cluster}}
\index{Cluster@{Cluster}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Cluster()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void Cluster (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{data,  }\item[{const size\+\_\+t}]{clusters,  }\item[{arma\+::\+Row$<$ size\+\_\+t $>$ \&}]{assignments }\end{DoxyParamCaption}) const}



Partition the given dataset into the given number of clusters according to the random sampling scheme outlined in Bradley and Fayyad\textquotesingle{}s paper, and return point assignments. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Mat\+Type} & Type of data (arma\+::mat or arma\+::sp\+\_\+mat). \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em data} & Dataset to partition. \\
\hline
{\em clusters} & Number of clusters to split dataset into. \\
\hline
{\em assignments} & Vector to store cluster assignments into. Values will be between 0 and (clusters -\/ 1). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_acdda97f316f0d4cdfaed698d3e2238fe}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Percentage@{Percentage}}
\index{Percentage@{Percentage}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Percentage()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily double Percentage (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the percentage of the data used by each subsampling. 



Definition at line 86 of file refined\+\_\+start.\+hpp.

\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_a1d19a253aece77d4ceae959c7d258599}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Percentage@{Percentage}}
\index{Percentage@{Percentage}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Percentage()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily double\& Percentage (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the percentage of the data used by each subsampling. 



Definition at line 88 of file refined\+\_\+start.\+hpp.

\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_abff9dd5e965cd5747ae7b92ab92ad4f8}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Samplings@{Samplings}}
\index{Samplings@{Samplings}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Samplings()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily size\+\_\+t Samplings (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the number of samplings that will be performed. 



Definition at line 81 of file refined\+\_\+start.\+hpp.

\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_aa6b6f2fd794693a5b6481b2b64ac8f8e}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!Samplings@{Samplings}}
\index{Samplings@{Samplings}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{Samplings()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily size\+\_\+t\& Samplings (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Modify the number of samplings that will be performed. 



Definition at line 83 of file refined\+\_\+start.\+hpp.

\mbox{\label{classmlpack_1_1kmeans_1_1RefinedStart_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::kmeans\+::\+Refined\+Start@{mlpack\+::kmeans\+::\+Refined\+Start}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Serialize the object. 



Definition at line 92 of file refined\+\_\+start.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/3.\+3.\+1/src/mlpack/methods/kmeans/\textbf{ refined\+\_\+start.\+hpp}\end{DoxyCompactItemize}
