\section{Missing\+Policy Class Reference}
\label{classmlpack_1_1data_1_1MissingPolicy}\index{Missing\+Policy@{Missing\+Policy}}


\doxyref{Missing\+Policy}{p.}{classmlpack_1_1data_1_1MissingPolicy} is used as a helper class for \doxyref{Dataset\+Mapper}{p.}{classmlpack_1_1data_1_1DatasetMapper}.  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
using \textbf{ Mapped\+Type} = double
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Missing\+Policy} ()
\item 
\textbf{ Missing\+Policy} (\textbf{ std\+::set}$<$ std\+::string $>$ missing\+Set)
\begin{DoxyCompactList}\small\item\em Create the \doxyref{Missing\+Policy}{p.}{classmlpack_1_1data_1_1MissingPolicy} object with the given missing\+Set. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \textbf{ Map\+First\+Pass} (const std\+::string \&, const size\+\_\+t)
\begin{DoxyCompactList}\small\item\em There is nothing for us to do here, but this is required by the Map\+Policy type. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Map\+Type , typename T $>$ }\\T \textbf{ Map\+String} (const std\+::string \&string, const size\+\_\+t dimension, Map\+Type \&maps, std\+::vector$<$ \textbf{ Datatype} $>$ \&)
\begin{DoxyCompactList}\small\item\em Given the string and the dimension to which it belongs by the user, and the maps and types given by the \doxyref{Dataset\+Mapper}{p.}{classmlpack_1_1data_1_1DatasetMapper} class, returns its numeric mapping. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const bool \textbf{ Needs\+First\+Pass} = false
\begin{DoxyCompactList}\small\item\em This doesn\textquotesingle{}t need a first pass over the data to set up. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\doxyref{Missing\+Policy}{p.}{classmlpack_1_1data_1_1MissingPolicy} is used as a helper class for \doxyref{Dataset\+Mapper}{p.}{classmlpack_1_1data_1_1DatasetMapper}. 

It tells how the strings should be mapped. Purpose of this policy is to map all user-\/defined missing variables into maps so that users can decide what to do with the corrupted data. User-\/defined missing variables are given by the missing\+Set. Note that \doxyref{Missing\+Policy}{p.}{classmlpack_1_1data_1_1MissingPolicy} does not change type of features. 

Definition at line 30 of file missing\+\_\+policy.\+hpp.



\subsection{Member Typedef Documentation}
\mbox{\label{classmlpack_1_1data_1_1MissingPolicy_a0265262ad1f0df167b2f48524b20b3e7}} 
\index{mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}!Mapped\+Type@{Mapped\+Type}}
\index{Mapped\+Type@{Mapped\+Type}!mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}}
\subsubsection{Mapped\+Type}
{\footnotesize\ttfamily using \textbf{ Mapped\+Type} =  double}



Definition at line 34 of file missing\+\_\+policy.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1data_1_1MissingPolicy_a90cec8cd33b9f03c43fb3ea28989e129}} 
\index{mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}!Missing\+Policy@{Missing\+Policy}}
\index{Missing\+Policy@{Missing\+Policy}!mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}}
\subsubsection{Missing\+Policy()\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \textbf{ Missing\+Policy} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Definition at line 36 of file missing\+\_\+policy.\+hpp.

\mbox{\label{classmlpack_1_1data_1_1MissingPolicy_a35006875c42df50a4adc4968e817a471}} 
\index{mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}!Missing\+Policy@{Missing\+Policy}}
\index{Missing\+Policy@{Missing\+Policy}!mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}}
\subsubsection{Missing\+Policy()\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \textbf{ Missing\+Policy} (\begin{DoxyParamCaption}\item[{\textbf{ std\+::set}$<$ std\+::string $>$}]{missing\+Set }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}



Create the \doxyref{Missing\+Policy}{p.}{classmlpack_1_1data_1_1MissingPolicy} object with the given missing\+Set. 

Note that the missing\+Set cannot be changed later; you will have to create a new \doxyref{Missing\+Policy}{p.}{classmlpack_1_1data_1_1MissingPolicy} object.


\begin{DoxyParams}{Parameters}
{\em missing\+Set} & Set of strings that should be mapped. \\
\hline
\end{DoxyParams}


Definition at line 48 of file missing\+\_\+policy.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1data_1_1MissingPolicy_a230e07e59bf0cfdcf5d75cc459c8b759}} 
\index{mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}!Map\+First\+Pass@{Map\+First\+Pass}}
\index{Map\+First\+Pass@{Map\+First\+Pass}!mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}}
\subsubsection{Map\+First\+Pass()}
{\footnotesize\ttfamily void Map\+First\+Pass (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{,  }\item[{const size\+\_\+t}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



There is nothing for us to do here, but this is required by the Map\+Policy type. 



Definition at line 62 of file missing\+\_\+policy.\+hpp.

\mbox{\label{classmlpack_1_1data_1_1MissingPolicy_a93a368288d49f1902675d2f3ff47227a}} 
\index{mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}!Map\+String@{Map\+String}}
\index{Map\+String@{Map\+String}!mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}}
\subsubsection{Map\+String()}
{\footnotesize\ttfamily T Map\+String (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{string,  }\item[{const size\+\_\+t}]{dimension,  }\item[{Map\+Type \&}]{maps,  }\item[{std\+::vector$<$ \textbf{ Datatype} $>$ \&}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Given the string and the dimension to which it belongs by the user, and the maps and types given by the \doxyref{Dataset\+Mapper}{p.}{classmlpack_1_1data_1_1DatasetMapper} class, returns its numeric mapping. 

If no mapping yet exists and the string is included in the missing\+Set, the string is added to the list of mappings for the given dimension. This function is used as a helper function for \doxyref{Dataset\+Mapper}{p.}{classmlpack_1_1data_1_1DatasetMapper} class.


\begin{DoxyTemplParams}{Template Parameters}
{\em Map\+Type} & Type of unordered\+\_\+map that contains mapped value pairs \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em string} & String to find/create mapping for. \\
\hline
{\em dimension} & Index of the dimension of the string. \\
\hline
{\em maps} & Unordered map given by the \doxyref{Dataset\+Mapper}{p.}{classmlpack_1_1data_1_1DatasetMapper}. \\
\hline
{\em types} & Vector containing the type information about each dimensions. \\
\hline
\end{DoxyParams}


Definition at line 82 of file missing\+\_\+policy.\+hpp.



\subsection{Member Data Documentation}
\mbox{\label{classmlpack_1_1data_1_1MissingPolicy_a6ef7d83a1da0e9f1d02b61f62e852079}} 
\index{mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}!Needs\+First\+Pass@{Needs\+First\+Pass}}
\index{Needs\+First\+Pass@{Needs\+First\+Pass}!mlpack\+::data\+::\+Missing\+Policy@{mlpack\+::data\+::\+Missing\+Policy}}
\subsubsection{Needs\+First\+Pass}
{\footnotesize\ttfamily const bool Needs\+First\+Pass = false\hspace{0.3cm}{\ttfamily [static]}}



This doesn\textquotesingle{}t need a first pass over the data to set up. 



Definition at line 55 of file missing\+\_\+policy.\+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/core/data/map\+\_\+policies/\textbf{ missing\+\_\+policy.\+hpp}\end{DoxyCompactItemize}
