\section{Oivs\+Initialization$<$ Activation\+Function $>$ Class Template Reference}
\label{classmlpack_1_1ann_1_1OivsInitialization}\index{Oivs\+Initialization$<$ Activation\+Function $>$@{Oivs\+Initialization$<$ Activation\+Function $>$}}


This class is used to initialize the weight matrix with the oivs method.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ Oivs\+Initialization} (const double epsilon=0.\+1, const int k=5, const double gamma=0.\+9)
\begin{DoxyCompactList}\small\item\em Initialize the random initialization rule with the given values. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Initialize} (arma\+::\+Mat$<$ eT $>$ \&W, const size\+\_\+t rows, const size\+\_\+t cols)
\begin{DoxyCompactList}\small\item\em Initialize the elements of the specified weight matrix with the oivs method. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Initialize} (arma\+::\+Mat$<$ eT $>$ \&W)
\begin{DoxyCompactList}\small\item\em Initialize the elements of the specified weight matrix with the oivs method. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Initialize} (arma\+::\+Cube$<$ eT $>$ \&W, const size\+\_\+t rows, const size\+\_\+t cols, const size\+\_\+t slices)
\begin{DoxyCompactList}\small\item\em Initialize the elements of the specified weight 3rd order tensor with the oivs method. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename eT $>$ }\\void \textbf{ Initialize} (arma\+::\+Cube$<$ eT $>$ \&W)
\begin{DoxyCompactList}\small\item\em Initialize the elements of the specified weight 3rd order tensor with the oivs method. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$class Activation\+Function = Logistic\+Function$>$\newline
class mlpack\+::ann\+::\+Oivs\+Initialization$<$ Activation\+Function $>$}

This class is used to initialize the weight matrix with the oivs method. 

The method is based on the equations representing the characteristics of the information transformation mechanism of a node. The method is defined by

\begin{eqnarray*} b &=& |F^{-1}(1 - \epsilon) - f^{-1}(\epsilon)| \\ \hat{w} &=& \frac{b}{k \cdot n} \\ \gamma &\le& a_i \le \gamma \\ w_i &=& \hat{w} \cdot \sqrt{a_i + 1} \end{eqnarray*}

Where f is the transfer function epsilon, k custom parameters, n the number of neurons in the outgoing layer and gamma a parameter that defines the random interval.


\begin{DoxyTemplParams}{Template Parameters}
{\em Activation\+Function} & The activation function used for the oivs method. \\
\hline
\end{DoxyTemplParams}


Definition at line 59 of file oivs\+\_\+init.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1ann_1_1OivsInitialization_a4a64a3e0ca005879d29245e45f027770}} 
\index{mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}!Oivs\+Initialization@{Oivs\+Initialization}}
\index{Oivs\+Initialization@{Oivs\+Initialization}!mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}}
\subsubsection{Oivs\+Initialization()}
{\footnotesize\ttfamily \textbf{ Oivs\+Initialization} (\begin{DoxyParamCaption}\item[{const double}]{epsilon = {\ttfamily 0.1},  }\item[{const int}]{k = {\ttfamily 5},  }\item[{const double}]{gamma = {\ttfamily 0.9} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Initialize the random initialization rule with the given values. 


\begin{DoxyParams}{Parameters}
{\em epsilon} & Parameter to control the activation region. \\
\hline
{\em k} & Parameter to control the activation region width. \\
\hline
{\em gamma} & Parameter to define the uniform random range. \\
\hline
\end{DoxyParams}


Definition at line 69 of file oivs\+\_\+init.\+hpp.



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1ann_1_1OivsInitialization_a5cfe472251a41fffd45b170bb0d3c1bd}} 
\index{mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}}
\subsubsection{Initialize()\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily void Initialize (\begin{DoxyParamCaption}\item[{arma\+::\+Mat$<$ eT $>$ \&}]{W,  }\item[{const size\+\_\+t}]{rows,  }\item[{const size\+\_\+t}]{cols }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Initialize the elements of the specified weight matrix with the oivs method. 


\begin{DoxyParams}{Parameters}
{\em W} & Weight matrix to initialize. \\
\hline
{\em rows} & Number of rows. \\
\hline
{\em cols} & Number of columns. \\
\hline
\end{DoxyParams}


Definition at line 86 of file oivs\+\_\+init.\+hpp.



References Random\+Initialization\+::\+Initialize().



Referenced by Oivs\+Initialization$<$ Activation\+Function $>$\+::\+Initialize().

\mbox{\label{classmlpack_1_1ann_1_1OivsInitialization_af2d770912321b8b9ca7b03ab98f735c0}} 
\index{mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}}
\subsubsection{Initialize()\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily void Initialize (\begin{DoxyParamCaption}\item[{arma\+::\+Mat$<$ eT $>$ \&}]{W }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Initialize the elements of the specified weight matrix with the oivs method. 


\begin{DoxyParams}{Parameters}
{\em W} & Weight matrix to initialize. \\
\hline
\end{DoxyParams}


Definition at line 100 of file oivs\+\_\+init.\+hpp.



References Random\+Initialization\+::\+Initialize().

\mbox{\label{classmlpack_1_1ann_1_1OivsInitialization_a40a2b6466bdba0f6aab4eb92b6e65934}} 
\index{mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}}
\subsubsection{Initialize()\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily void Initialize (\begin{DoxyParamCaption}\item[{arma\+::\+Cube$<$ eT $>$ \&}]{W,  }\item[{const size\+\_\+t}]{rows,  }\item[{const size\+\_\+t}]{cols,  }\item[{const size\+\_\+t}]{slices }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Initialize the elements of the specified weight 3rd order tensor with the oivs method. 


\begin{DoxyParams}{Parameters}
{\em W} & 3rd order tensor to initialize. \\
\hline
{\em rows} & Number of rows. \\
\hline
{\em cols} & Number of columns. \\
\hline
{\em slices} & Number of slices. \\
\hline
\end{DoxyParams}


Definition at line 118 of file oivs\+\_\+init.\+hpp.



References Oivs\+Initialization$<$ Activation\+Function $>$\+::\+Initialize().

\mbox{\label{classmlpack_1_1ann_1_1OivsInitialization_ae2f3e6d570824a160b687ff9f734f83c}} 
\index{mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!mlpack\+::ann\+::\+Oivs\+Initialization@{mlpack\+::ann\+::\+Oivs\+Initialization}}
\subsubsection{Initialize()\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily void Initialize (\begin{DoxyParamCaption}\item[{arma\+::\+Cube$<$ eT $>$ \&}]{W }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Initialize the elements of the specified weight 3rd order tensor with the oivs method. 


\begin{DoxyParams}{Parameters}
{\em W} & 3rd order tensor to initialize. \\
\hline
\end{DoxyParams}


Definition at line 137 of file oivs\+\_\+init.\+hpp.



References Log\+::\+Fatal, and Oivs\+Initialization$<$ Activation\+Function $>$\+::\+Initialize().



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/init\+\_\+rules/\textbf{ oivs\+\_\+init.\+hpp}\end{DoxyCompactItemize}
