\section{Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$ Class Template Reference}
\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit}\index{Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$@{Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$}}


The \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} class implements the numeric feature splitting strategy alluded to by Domingos and Hulten in the following paper\+:  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef \textbf{ Numeric\+Split\+Info}$<$ Observation\+Type $>$ \textbf{ Split\+Info}
\begin{DoxyCompactList}\small\item\em The splitting information type required by the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Hoeffding\+Numeric\+Split} (const size\+\_\+t num\+Classes=0, const size\+\_\+t bins=10, const size\+\_\+t observations\+Before\+Binning=100)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} class, and specify some basic parameters about how the binning should take place. \end{DoxyCompactList}\item 
\textbf{ Hoeffding\+Numeric\+Split} (const size\+\_\+t num\+Classes, const \textbf{ Hoeffding\+Numeric\+Split} \&other)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} class, using the parameters from the given other split object. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Bins} () const
\begin{DoxyCompactList}\small\item\em Return the number of bins. \end{DoxyCompactList}\item 
void \textbf{ Evaluate\+Fitness\+Function} (double \&best\+Fitness, double \&second\+Best\+Fitness) const
\begin{DoxyCompactList}\small\item\em Evaluate the fitness function given what has been calculated so far. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Majority\+Class} () const
\begin{DoxyCompactList}\small\item\em Return the majority class. \end{DoxyCompactList}\item 
double \textbf{ Majority\+Probability} () const
\begin{DoxyCompactList}\small\item\em Return the probability of the majority class. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ Num\+Children} () const
\begin{DoxyCompactList}\small\item\em Return the number of children if this node splits on this feature. \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}\item 
void \textbf{ Split} (arma\+::\+Col$<$ size\+\_\+t $>$ \&child\+Majorities, \textbf{ Split\+Info} \&split\+Info) const
\begin{DoxyCompactList}\small\item\em Return the majority class of each child to be created, if a split on this dimension was performed. \end{DoxyCompactList}\item 
void \textbf{ Train} (Observation\+Type value, const size\+\_\+t label)
\begin{DoxyCompactList}\small\item\em Train the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} on the given observed value (remember that this object only cares about the information for a single feature, not an entire point). \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename Fitness\+Function, typename Observation\+Type = double$>$\newline
class mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$}

The \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} class implements the numeric feature splitting strategy alluded to by Domingos and Hulten in the following paper\+: 


\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}


The strategy alluded to is very simple\+: we discretize the numeric features that we see. But in this case, we don\textquotesingle{}t know how many bins we have, which makes things a little difficult. This class only makes binary splits, and has a maximum number of bins. The binning strategy is simple\+: the split caches the minimum and maximum value of points seen so far, and when the number of points hits a predefined threshold, the cached minimum-\/maximum range is equally split into bins, and splitting proceeds in the same way as with the categorical splits. This is a simple and stupid strategy, so don\textquotesingle{}t expect it to be the best possible thing you can do.


\begin{DoxyTemplParams}{Template Parameters}
{\em Fitness\+Function} & Fitness function to use for calculating gain. \\
\hline
{\em Observation\+Type} & Type of observations in this dimension. \\
\hline
\end{DoxyTemplParams}


Definition at line 53 of file hoeffding\+\_\+numeric\+\_\+split.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit_ab96dc0dd71f3e2aca194f2c83abc65a4}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}!Split\+Info@{Split\+Info}}
\index{Split\+Info@{Split\+Info}!mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}}
\subsubsection{Split\+Info}
{\footnotesize\ttfamily typedef \textbf{ Numeric\+Split\+Info}$<$Observation\+Type$>$ \textbf{ Split\+Info}}



The splitting information type required by the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit}. 



Definition at line 57 of file hoeffding\+\_\+numeric\+\_\+split.\+hpp.



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



Create the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} class, and specify some basic parameters about how the binning should take place. 


\begin{DoxyParams}{Parameters}
{\em num\+Classes} & Number of classes. \\
\hline
{\em bins} & Number of bins. \\
\hline
{\em observations\+Before\+Binning} & Number of points to see before binning is performed. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit_a9193134c37305448ee4dd854de7cd22e}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}!Hoeffding\+Numeric\+Split@{Hoeffding\+Numeric\+Split}}
\index{Hoeffding\+Numeric\+Split@{Hoeffding\+Numeric\+Split}!mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}}
\subsubsection{Hoeffding\+Numeric\+Split()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Hoeffding\+Numeric\+Split} (\begin{DoxyParamCaption}\item[{const size\+\_\+t}]{num\+Classes,  }\item[{const \textbf{ Hoeffding\+Numeric\+Split}$<$ Fitness\+Function, Observation\+Type $>$ \&}]{other }\end{DoxyParamCaption})}



Create the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} class, using the parameters from the given other split object. 



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit_a1fad01f08637cd9cb2934b21ab703778}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}!Bins@{Bins}}
\index{Bins@{Bins}!mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}}
\subsubsection{Bins()}
{\footnotesize\ttfamily size\+\_\+t Bins (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Return the number of bins. 



Definition at line 120 of file hoeffding\+\_\+numeric\+\_\+split.\+hpp.



References Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$\+::serialize().

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit_ab4f1b00c777ddabfddd98e45093b97ab}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}!Evaluate\+Fitness\+Function@{Evaluate\+Fitness\+Function}}
\index{Evaluate\+Fitness\+Function@{Evaluate\+Fitness\+Function}!mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+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}



Evaluate the fitness function given what has been calculated so far. 

In this case, if binning has not yet been performed, 0 will be returned (i.\+e., no gain). Because this split can only split one possible way, second\+Best\+Fitness (the fitness function for the second best possible split) will be set to 0.


\begin{DoxyParams}{Parameters}
{\em best\+Fitness} & Value of the fitness function for the best possible split. \\
\hline
{\em second\+Best\+Fitness} & Value of the fitness function for the second best possible split (always 0 for this split). \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit_a2fbf818eb68075c92655a22904b7ee1a}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}!Majority\+Class@{Majority\+Class}}
\index{Majority\+Class@{Majority\+Class}!mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}}
\subsubsection{Majority\+Class()}
{\footnotesize\ttfamily size\+\_\+t Majority\+Class (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the majority class. 



Referenced by Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$\+::\+Num\+Children().

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



Return the probability of the majority class. 



Referenced by Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$\+::\+Num\+Children().

\mbox{\label{classmlpack_1_1tree_1_1HoeffdingNumericSplit_a1f7ec083be66d58a3e02e12956bf005e}} 
\index{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split}!Num\+Children@{Num\+Children}}
\index{Num\+Children@{Num\+Children}!mlpack\+::tree\+::\+Hoeffding\+Numeric\+Split@{mlpack\+::tree\+::\+Hoeffding\+Numeric\+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 this node splits on this feature. 



Definition at line 106 of file hoeffding\+\_\+numeric\+\_\+split.\+hpp.



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

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



Serialize the object. 



Referenced by Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$\+::\+Bins().

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



Return the majority class of each child to be created, if a split on this dimension was performed. 

Also create the split object. 

Referenced by Hoeffding\+Numeric\+Split$<$ Fitness\+Function, Observation\+Type $>$\+::\+Num\+Children().

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



Train the \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} on the given observed value (remember that this object only cares about the information for a single feature, not an entire point). 


\begin{DoxyParams}{Parameters}
{\em value} & Value in the dimension that this \doxyref{Hoeffding\+Numeric\+Split}{p.}{classmlpack_1_1tree_1_1HoeffdingNumericSplit} refers to. \\
\hline
{\em label} & Label of the given point. \\
\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.\+1/src/mlpack/methods/hoeffding\+\_\+trees/\textbf{ hoeffding\+\_\+numeric\+\_\+split.\+hpp}\end{DoxyCompactItemize}
