\section{L\+Regularizer$<$ T\+Power $>$ Class Template Reference}
\label{classmlpack_1_1ann_1_1LRegularizer}\index{L\+Regularizer$<$ T\+Power $>$@{L\+Regularizer$<$ T\+Power $>$}}


The L\+\_\+p regularizer for arbitrary integer p.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ L\+Regularizer} (double \textbf{ factor}=1.\+0)
\begin{DoxyCompactList}\small\item\em Create the regularizer object. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Mat\+Type $>$ }\\void \textbf{ Evaluate} (const Mat\+Type \&weight, Mat\+Type \&gradient)
\begin{DoxyCompactList}\small\item\em Calculate the gradient for regularization. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the regularizer (nothing to do). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
double \textbf{ factor}
\begin{DoxyCompactList}\small\item\em The constant for the regularization. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const int \textbf{ Power} = T\+Power
\begin{DoxyCompactList}\small\item\em The power of the regularizer. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$int T\+Power$>$\newline
class mlpack\+::ann\+::\+L\+Regularizer$<$ T\+Power $>$}

The L\+\_\+p regularizer for arbitrary integer p. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Power} & Power of regularizer; i.\+e. Power = 1 gives the L1-\/regularization. \\
\hline
\end{DoxyTemplParams}


Definition at line 27 of file lregularizer.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1ann_1_1LRegularizer_af4560ea21b7a7f93ad15a5ea65cf5c36}} 
\index{mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}!L\+Regularizer@{L\+Regularizer}}
\index{L\+Regularizer@{L\+Regularizer}!mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}}
\subsubsection{L\+Regularizer()}
{\footnotesize\ttfamily \textbf{ L\+Regularizer} (\begin{DoxyParamCaption}\item[{double}]{factor = {\ttfamily 1.0} }\end{DoxyParamCaption})}



Create the regularizer object. 


\begin{DoxyParams}{Parameters}
{\em factor} & The factor for regularization. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1ann_1_1LRegularizer_a77155b253292485b11241c0a4f04612a}} 
\index{mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}}
\subsubsection{Evaluate()}
{\footnotesize\ttfamily void Evaluate (\begin{DoxyParamCaption}\item[{const Mat\+Type \&}]{weight,  }\item[{Mat\+Type \&}]{gradient }\end{DoxyParamCaption})}



Calculate the gradient for regularization. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Mat\+Type} & Type of weight matrix. \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em weight} & The weight matrix to be regularized. \\
\hline
{\em gradient} & The calculated gradient. \\
\hline
\end{DoxyParams}
\mbox{\label{classmlpack_1_1ann_1_1LRegularizer_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})}



Serialize the regularizer (nothing to do). 



\subsection{Member Data Documentation}
\mbox{\label{classmlpack_1_1ann_1_1LRegularizer_a2d7e5dd7a479c4c7aef6e6133a1441c5}} 
\index{mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}!factor@{factor}}
\index{factor@{factor}!mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}}
\subsubsection{factor}
{\footnotesize\ttfamily double factor}



The constant for the regularization. 



Definition at line 55 of file lregularizer.\+hpp.

\mbox{\label{classmlpack_1_1ann_1_1LRegularizer_add828b673634e896b13f47cc7fb331f5}} 
\index{mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}!Power@{Power}}
\index{Power@{Power}!mlpack\+::ann\+::\+L\+Regularizer@{mlpack\+::ann\+::\+L\+Regularizer}}
\subsubsection{Power}
{\footnotesize\ttfamily const int Power = T\+Power\hspace{0.3cm}{\ttfamily [static]}}



The power of the regularizer. 



Definition at line 52 of file lregularizer.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/git/src/mlpack/methods/ann/regularizer/\textbf{ lregularizer.\+hpp}\end{DoxyCompactItemize}
