\section{Recall$<$ AS, Positive\+Class $>$ Class Template Reference}
\label{classmlpack_1_1cv_1_1Recall}\index{Recall$<$ A\+S, Positive\+Class $>$@{Recall$<$ A\+S, Positive\+Class $>$}}


\doxyref{Recall}{p.}{classmlpack_1_1cv_1_1Recall} is a metric of performance for classification algorithms that for binary classification is equal to $ tp / (tp + fn) $, where $ tp $ and $ fn $ are the numbers of true positives and false negatives respectively.  


\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename M\+L\+Algorithm , typename Data\+Type $>$ }\\static double \textbf{ Evaluate} (M\+L\+Algorithm \&model, const Data\+Type \&data, const arma\+::\+Row$<$ size\+\_\+t $>$ \&labels)
\begin{DoxyCompactList}\small\item\em Run classification and calculate recall. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const bool \textbf{ Needs\+Minimization} = false
\begin{DoxyCompactList}\small\item\em Information for hyper-\/parameter tuning code. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$Average\+Strategy AS, size\+\_\+t Positive\+Class = 1$>$\newline
class mlpack\+::cv\+::\+Recall$<$ A\+S, Positive\+Class $>$}

\doxyref{Recall}{p.}{classmlpack_1_1cv_1_1Recall} is a metric of performance for classification algorithms that for binary classification is equal to $ tp / (tp + fn) $, where $ tp $ and $ fn $ are the numbers of true positives and false negatives respectively. 

For multiclass classification the recall metric can be used with the following strategies for averaging.
\begin{DoxyEnumerate}
\item Micro. If there are $ N + 1 $ classes in total, the result is equal to \[ (tp_0 + tp_1 + \ldots + tp_N) / (tp_0 + tp_1 + \ldots + tp_N + fn_0 + fn_1 + \ldots + fn_N), \] where $ tp_i $ and $ fn_i $ are the numbers of true positives and false negatives respectively for the class (label) $ i $.
\item Macro. If there are $ N + 1 $ classes in total, the result is equal to the mean of the values \[ tp_0 / (tp_0 + fn_0), tp_1 / (tp_1 + fn_1), \ldots, tp_N / (tp_N + fn_N), \] where $ tp_i $ and $ fn_i $ are the numbers of true positives and false negatives respectively for the class (label) $ i $.
\end{DoxyEnumerate}


\begin{DoxyTemplParams}{Template Parameters}
{\em AS} & An average strategy. \\
\hline
{\em Positive\+Class} & In the case of binary classification (AS = Binary) positives are assumed to have labels equal to this value. \\
\hline
\end{DoxyTemplParams}


Definition at line 48 of file recall.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1cv_1_1Recall_a77b6a9eb952b01bfc5c0d854da700465}} 
\index{mlpack\+::cv\+::\+Recall@{mlpack\+::cv\+::\+Recall}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::cv\+::\+Recall@{mlpack\+::cv\+::\+Recall}}
\subsubsection{Evaluate()}
{\footnotesize\ttfamily static double Evaluate (\begin{DoxyParamCaption}\item[{M\+L\+Algorithm \&}]{model,  }\item[{const Data\+Type \&}]{data,  }\item[{const arma\+::\+Row$<$ size\+\_\+t $>$ \&}]{labels }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Run classification and calculate recall. 


\begin{DoxyParams}{Parameters}
{\em model} & A classification model. \\
\hline
{\em data} & Column-\/major data containing test items. \\
\hline
{\em labels} & Ground truth (correct) labels for the test items. \\
\hline
\end{DoxyParams}


\subsection{Member Data Documentation}
\mbox{\label{classmlpack_1_1cv_1_1Recall_a59117419810548f86c24651ffa3500d5}} 
\index{mlpack\+::cv\+::\+Recall@{mlpack\+::cv\+::\+Recall}!Needs\+Minimization@{Needs\+Minimization}}
\index{Needs\+Minimization@{Needs\+Minimization}!mlpack\+::cv\+::\+Recall@{mlpack\+::cv\+::\+Recall}}
\subsubsection{Needs\+Minimization}
{\footnotesize\ttfamily const bool Needs\+Minimization = false\hspace{0.3cm}{\ttfamily [static]}}



Information for hyper-\/parameter tuning code. 

It indicates that we want to maximize the metric. 

Definition at line 67 of file recall.\+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.\+2/src/mlpack/core/cv/metrics/\textbf{ recall.\+hpp}\end{DoxyCompactItemize}
