mlpack  master
Public Member Functions | Private Attributes | List of all members
mlpack::ann::OivsInitialization< ActivationFunction > Class Template Reference

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

Public Member Functions

 OivsInitialization (const double epsilon=0.1, const int k=5, const double gamma=0.9)
 Initialize the random initialization rule with the given values. More...
 
template<typename eT >
void Initialize (arma::Mat< eT > &W, const size_t rows, const size_t cols)
 Initialize the elements of the specified weight matrix with the oivs method. More...
 
template<typename eT >
void Initialize (arma::Cube< eT > &W, const size_t rows, const size_t cols, const size_t slices)
 Initialize the elements of the specified weight 3rd order tensor with the oivs method. More...
 

Private Attributes

const double b
 Parameter to control the activation region. More...
 
const double gamma
 Parameter to define the uniform random range. More...
 
const int k
 Parameter to control the activation region width. More...
 

Detailed Description

template<class ActivationFunction = LogisticFunction>
class mlpack::ann::OivsInitialization< ActivationFunction >

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.

Template Parameters
ActivationFunctionThe activation function used for the oivs method.

Definition at line 59 of file oivs_init.hpp.

Constructor & Destructor Documentation

template<class ActivationFunction = LogisticFunction>
mlpack::ann::OivsInitialization< ActivationFunction >::OivsInitialization ( const double  epsilon = 0.1,
const int  k = 5,
const double  gamma = 0.9 
)
inline

Initialize the random initialization rule with the given values.

Parameters
epsilonParameter to control the activation region.
kParameter to control the activation region width.
gammaParameter to define the uniform random range.

Definition at line 69 of file oivs_init.hpp.

Member Function Documentation

template<class ActivationFunction = LogisticFunction>
template<typename eT >
void mlpack::ann::OivsInitialization< ActivationFunction >::Initialize ( arma::Mat< eT > &  W,
const size_t  rows,
const size_t  cols 
)
inline

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

Parameters
WWeight matrix to initialize.
rowsNumber of rows.
colsNumber of columns.

Definition at line 86 of file oivs_init.hpp.

References mlpack::ann::OivsInitialization< ActivationFunction >::b, mlpack::ann::OivsInitialization< ActivationFunction >::gamma, mlpack::ann::RandomInitialization::Initialize(), and mlpack::ann::OivsInitialization< ActivationFunction >::k.

Referenced by mlpack::ann::OivsInitialization< ActivationFunction >::Initialize().

template<class ActivationFunction = LogisticFunction>
template<typename eT >
void mlpack::ann::OivsInitialization< ActivationFunction >::Initialize ( arma::Cube< eT > &  W,
const size_t  rows,
const size_t  cols,
const size_t  slices 
)
inline

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

Parameters
W3rd order tensor to initialize.
rowsNumber of rows.
colsNumber of columns.
slicesNumber of slices.

Definition at line 104 of file oivs_init.hpp.

References mlpack::ann::OivsInitialization< ActivationFunction >::Initialize().

Member Data Documentation

template<class ActivationFunction = LogisticFunction>
const double mlpack::ann::OivsInitialization< ActivationFunction >::b
private

Parameter to control the activation region.

Definition at line 123 of file oivs_init.hpp.

Referenced by mlpack::ann::OivsInitialization< ActivationFunction >::Initialize().

template<class ActivationFunction = LogisticFunction>
const double mlpack::ann::OivsInitialization< ActivationFunction >::gamma
private

Parameter to define the uniform random range.

Definition at line 120 of file oivs_init.hpp.

Referenced by mlpack::ann::OivsInitialization< ActivationFunction >::Initialize().

template<class ActivationFunction = LogisticFunction>
const int mlpack::ann::OivsInitialization< ActivationFunction >::k
private

Parameter to control the activation region width.

Definition at line 117 of file oivs_init.hpp.

Referenced by mlpack::ann::OivsInitialization< ActivationFunction >::Initialize().


The documentation for this class was generated from the following file: