27 #ifndef MLPACK_METHODS_ANN_INIT_RULES_KATHIRVALAVAKUMAR_SUBAVATHI_INIT_HPP 28 #define MLPACK_METHODS_ANN_INIT_RULES_KATHIRVALAVAKUMAR_SUBAVATHI_INIT_HPP 67 const double s) : s(s)
69 dataSum = arma::sum(data % data);
81 void Initialize(arma::Mat<eT>& W,
const size_t rows,
const size_t cols)
83 arma::Row<eT> b =
s * arma::sqrt(3 / (rows *
dataSum));
84 const double theta = b.min();
103 W = arma::Cube<eT>(rows, cols, slices);
105 for (
size_t i = 0; i < slices; i++)
KathirvalavakumarSubavathiInitialization(const arma::Mat< eT > &data, const double s)
Initialize the random initialization rule with the given values.
Linear algebra utility functions, generally performed on matrices or vectors.
void Initialize(arma::Mat< eT > &W, const size_t rows, const size_t cols)
Initialize the elements of the specified weight matrix with the Kathirvalavakumar-Subavathi method...
This class is used to initialize randomly the weight matrix.
The core includes that mlpack expects; standard C++ includes and Armadillo.
const double s
Parameter that defines the active region.
This class is used to initialize the weight matrix with the method proposed by T. ...
arma::rowvec dataSum
Parameter that defines the sum of elements in each column.
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 Kathirvalavakumar-Subavathi...
void Initialize(arma::Mat< eT > &W, const size_t rows, const size_t cols)
Initialize randomly the elements of the specified weight matrix.