\section{Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$ Class Template Reference}
\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit}\index{Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$@{Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$}}


This is the standard Hoeffding-\/bound categorical feature proposed in the paper below\+:  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \textbf{ Categorical\+Split\+Info} \textbf{ Split\+Info}
\begin{DoxyCompactList}\small\item\em The type of split information required by the \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Hoeffding\+Categorical\+Split} (const size\+\_\+t num\+Categories=0, const size\+\_\+t num\+Classes=0)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit} given a number of categories for this dimension and a number of classes. \end{DoxyCompactList}\item 
\textbf{ Hoeffding\+Categorical\+Split} (const size\+\_\+t num\+Categories, const size\+\_\+t num\+Classes, const \textbf{ Hoeffding\+Categorical\+Split} \&other)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit} given a number of categories for this dimension and a number of classes and another \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit} to take parameters from. \end{DoxyCompactList}\item 
void \textbf{ Evaluate\+Fitness\+Function} (double \&best\+Fitness, double \&second\+Best\+Fitness) const
\begin{DoxyCompactList}\small\item\em Given the points seen so far, evaluate the fitness function, returning the gain for the best possible split and the second best possible split. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Majority\+Class} () const
\begin{DoxyCompactList}\small\item\em Get the majority class seen so far. \end{DoxyCompactList}\item 
double \textbf{ Majority\+Probability} () const
\begin{DoxyCompactList}\small\item\em Get the probability of the majority class given the points seen so far. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Children} () const
\begin{DoxyCompactList}\small\item\em Return the number of children, if the node were to split. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the categorical split. \end{DoxyCompactList}\item 
void \textbf{ Split} (arma\+::\+Col$<$ size\+\_\+t $>$ \&child\+Majorities, \textbf{ Split\+Info} \&split\+Info)
\begin{DoxyCompactList}\small\item\em Gather the information for a split\+: get the labels of the child majorities, and initialize the Split\+Info object. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Train} (eT value, const size\+\_\+t label)
\begin{DoxyCompactList}\small\item\em Train on the given value with the given label. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Fitness\+Function$>$\newline
class mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$}

This is the standard Hoeffding-\/bound categorical feature proposed in the paper below\+: 


\begin{DoxyCode}
@inproceedings\{domingos2000mining,
  title=\{\{Mining High-Speed Data Streams\}\},
  author=\{Domingos, P. and Hulten, G.\},
  year=\{2000\},
  booktitle=\{Proceedings of the Sixth ACM SIGKDD International Conference on
      Knowledge Discovery and Data Mining (KDD \textcolor{stringliteral}{'00)\},}
\textcolor{stringliteral}{  pages=\{71--80\}}
\textcolor{stringliteral}{\}}
\end{DoxyCode}


This class will track the sufficient statistics of the training points it has seen. The Hoeffding\+Split class (and other related classes) can use this class to track categorical features and split decision tree nodes.


\begin{DoxyTemplParams}{Template Parameters}
{\em Fitness\+Function} & Fitness function to use for calculating gain. \\
\hline
\end{DoxyTemplParams}


Definition at line 44 of file hoeffding\+\_\+categorical\+\_\+split.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_ae55bc875c7f68cd63e45eb0ac35de5aa}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Split\+Info@{Split\+Info}}
\index{Split\+Info@{Split\+Info}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Split\+Info}
{\footnotesize\ttfamily typedef \textbf{ Categorical\+Split\+Info} \textbf{ Split\+Info}}



The type of split information required by the \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit}. 



Definition at line 48 of file hoeffding\+\_\+categorical\+\_\+split.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_ac8914c662d828e446d1e7065094a3c29}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Hoeffding\+Categorical\+Split@{Hoeffding\+Categorical\+Split}}
\index{Hoeffding\+Categorical\+Split@{Hoeffding\+Categorical\+Split}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Hoeffding\+Categorical\+Split()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Hoeffding\+Categorical\+Split} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{num\+Categories = {\ttfamily 0},  }\item[{const size\+\_\+t}]{num\+Classes = {\ttfamily 0} }\end{DoxyParamCaption})}



Create the \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit} given a number of categories for this dimension and a number of classes. 


\begin{DoxyParams}{Parameters}
{\em num\+Categories} & Number of categories in this dimension. \\
\hline
{\em num\+Classes} & Number of classes in this dimension. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_aae839eb9d04cd687215fa58ae14d265f}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Hoeffding\+Categorical\+Split@{Hoeffding\+Categorical\+Split}}
\index{Hoeffding\+Categorical\+Split@{Hoeffding\+Categorical\+Split}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Hoeffding\+Categorical\+Split()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Hoeffding\+Categorical\+Split} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{num\+Categories,  }\item[{const size\+\_\+t}]{num\+Classes,  }\item[{const \textbf{ Hoeffding\+Categorical\+Split}$<$ Fitness\+Function $>$ \&}]{other }\end{DoxyParamCaption})}



Create the \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit} given a number of categories for this dimension and a number of classes and another \doxyref{Hoeffding\+Categorical\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit} to take parameters from. 

In this particular case, there are no parameters to take, but this constructor is required by the \doxyref{Hoeffding\+Tree}{p.}{classmlpack_1_1tree_1_1HoeffdingTree} class. 

\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_ab4f1b00c777ddabfddd98e45093b97ab}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Evaluate\+Fitness\+Function@{Evaluate\+Fitness\+Function}}
\index{Evaluate\+Fitness\+Function@{Evaluate\+Fitness\+Function}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Evaluate\+Fitness\+Function()}
{\footnotesize\ttfamily void Evaluate\+Fitness\+Function (\begin{DoxyParamCaption}\item[{double \&}]{best\+Fitness,  }\item[{double \&}]{second\+Best\+Fitness }\end{DoxyParamCaption}) const}



Given the points seen so far, evaluate the fitness function, returning the gain for the best possible split and the second best possible split. 

In this splitting technique, we only split one possible way, so second\+Best\+Fitness will always be 0.


\begin{DoxyParams}{Parameters}
{\em best\+Fitness} & The fitness function result for this split. \\
\hline
{\em second\+Best\+Fitness} & This is always set to 0 (this split only splits one way). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_a2fbf818eb68075c92655a22904b7ee1a}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Majority\+Class@{Majority\+Class}}
\index{Majority\+Class@{Majority\+Class}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Majority\+Class()}
{\footnotesize\ttfamily size\+\_\+t Majority\+Class (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the majority class seen so far. 



Referenced by Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$\+::\+Num\+Children().

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_a68e5f5a4d8c6194482a83440619be83b}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Majority\+Probability@{Majority\+Probability}}
\index{Majority\+Probability@{Majority\+Probability}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Majority\+Probability()}
{\footnotesize\ttfamily double Majority\+Probability (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Get the probability of the majority class given the points seen so far. 



Referenced by Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$\+::\+Num\+Children().

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_a1f7ec083be66d58a3e02e12956bf005e}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Num\+Children@{Num\+Children}}
\index{Num\+Children@{Num\+Children}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Num\+Children()}
{\footnotesize\ttfamily size\+\_\+t Num\+Children (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the number of children, if the node were to split. 



Definition at line 93 of file hoeffding\+\_\+categorical\+\_\+split.\+hpp.



References Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$\+::\+Majority\+Class(), Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$\+::\+Majority\+Probability(), and Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$\+::\+Split().

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Serialize the categorical split. 



Definition at line 111 of file hoeffding\+\_\+categorical\+\_\+split.\+hpp.

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_a12faa9838c740b8383130fee17c108b6}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Split@{Split}}
\index{Split@{Split}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Split()}
{\footnotesize\ttfamily void Split (\begin{DoxyParamCaption}\item[{arma\+::\+Col$<$ size\+\_\+t $>$ \&}]{child\+Majorities,  }\item[{\textbf{ Split\+Info} \&}]{split\+Info }\end{DoxyParamCaption})}



Gather the information for a split\+: get the labels of the child majorities, and initialize the Split\+Info object. 


\begin{DoxyParams}{Parameters}
{\em child\+Majorities} & Majorities of child nodes to be created. \\
\hline
{\em split\+Info} & Information for splitting. \\
\hline
\end{DoxyParams}


Referenced by Hoeffding\+Categorical\+Split$<$ Fitness\+Function $>$\+::\+Num\+Children().

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingCategoricalSplit_a066e841465846ace64e00f9b6fef9b27}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}!Train@{Train}}
\index{Train@{Train}!mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split@{mlpack\+::tree\+::\+Hoeffding\+Categorical\+Split}}
\subsubsection{Train()}
{\footnotesize\ttfamily void Train (\begin{DoxyParamCaption}\item[{eT}]{value,  }\item[{const size\+\_\+t}]{label }\end{DoxyParamCaption})}



Train on the given value with the given label. 


\begin{DoxyParams}{Parameters}
{\em value} & Value to train on. \\
\hline
{\em label} & Label to train on. \\
\hline
\end{DoxyParams}


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.\+0/src/mlpack/methods/hoeffding\+\_\+trees/\textbf{ hoeffding\+\_\+categorical\+\_\+split.\+hpp}\end{DoxyCompactItemize}
