other versions
- jessie 1.0.10-1
mlpack::nn::SparseAutoencoderFunction(3) | MLPACK | mlpack::nn::SparseAutoencoderFunction(3) |
NAME¶
mlpack::nn::SparseAutoencoderFunction - This is a class for the sparse autoencoder objective function.SYNOPSIS¶
Public Member Functions¶
SparseAutoencoderFunction (const arma::mat &data, const size_t visibleSize, const size_t hiddenSize, const double lambda=0.0001, const double beta=3, const double rho=0.01)
Private Attributes¶
double beta
Detailed Description¶
This is a class for the sparse autoencoder objective function. It can be used to create learning models like self-taught learning, stacked autoencoders, conditional random fields (CRFs), and so forth. Definition at line 36 of file sparse_autoencoder_function.hpp.Constructor & Destructor Documentation¶
mlpack::nn::SparseAutoencoderFunction::SparseAutoencoderFunction (const arma::mat &data, const size_tvisibleSize, const size_thiddenSize, const doublelambda = 0.0001, const doublebeta = 3, const doublerho = 0.01)¶
Construct the sparse autoencoder objective function with the given parameters. Parameters:data The data matrix.
visibleSize Size of input vector expected at the visible layer.
hiddenSize Size of input vector expected at the hidden layer.
lambda L2-regularization parameter.
beta KL divergence parameter.
rho Sparsity parameter.
Member Function Documentation¶
void mlpack::nn::SparseAutoencoderFunction::Beta (const doubleb) [inline]¶
Sets the KL divergence parameter. Definition at line 134 of file sparse_autoencoder_function.hpp. References beta.double mlpack::nn::SparseAutoencoderFunction::Beta () const [inline]¶
Gets the KL divergence parameter. Definition at line 140 of file sparse_autoencoder_function.hpp. References beta.double mlpack::nn::SparseAutoencoderFunction::Evaluate (const arma::mat ¶meters) const¶
Evaluates the objective function of the sparse autoencoder model using the given parameters. The cost function has terms for the reconstruction error, regularization cost and the sparsity cost. The objective function takes a low value when the model is able to reconstruct the data well using weights which are low in value and when the average activations of neurons in the hidden layers agrees well with the sparsity parameter 'rho'. Parameters:parameters Current values of the model
parameters.
const arma::mat& mlpack::nn::SparseAutoencoderFunction::GetInitialPoint () const [inline]¶
Return the initial point for the optimization. Definition at line 95 of file sparse_autoencoder_function.hpp. References initialPoint.void mlpack::nn::SparseAutoencoderFunction::Gradient (const arma::mat ¶meters, arma::mat &gradient) const¶
Evaluates the gradient values of the objective function given the current set of parameters. The function performs a feedforward pass and computes the error in reconstructing the data points. It then uses the backpropagation algorithm to compute the gradient values. Parameters:parameters Current values of the model parameters.
gradient Matrix where gradient values will be stored.
void mlpack::nn::SparseAutoencoderFunction::HiddenSize (const size_thidden) [inline]¶
Sets size of the hidden layer. Definition at line 110 of file sparse_autoencoder_function.hpp.size_t mlpack::nn::SparseAutoencoderFunction::HiddenSize () const [inline]¶
Gets the size of the hidden layer. Definition at line 116 of file sparse_autoencoder_function.hpp. References hiddenSize.const arma::mat mlpack::nn::SparseAutoencoderFunction::InitializeWeights ()¶
Initializes the parameters of the model to suitable values.void mlpack::nn::SparseAutoencoderFunction::Lambda (const doublel) [inline]¶
Sets the L2-regularization parameter. Definition at line 122 of file sparse_autoencoder_function.hpp. References lambda.double mlpack::nn::SparseAutoencoderFunction::Lambda () const [inline]¶
Gets the L2-regularization parameter. Definition at line 128 of file sparse_autoencoder_function.hpp. References lambda.void mlpack::nn::SparseAutoencoderFunction::Rho (const doubler) [inline]¶
Sets the sparsity parameter. Definition at line 146 of file sparse_autoencoder_function.hpp. References rho.double mlpack::nn::SparseAutoencoderFunction::Rho () const [inline]¶
Gets the sparsity parameter. Definition at line 152 of file sparse_autoencoder_function.hpp. References rho.void mlpack::nn::SparseAutoencoderFunction::Sigmoid (const arma::mat &x, arma::mat &output) const [inline]¶
Returns the elementwise sigmoid of the passed matrix, where the sigmoid function of a real number 'x' is [1 / (1 + exp(-x))]. Parameters:x Matrix of real values for which we require the
sigmoid activation.
Definition at line 89 of file sparse_autoencoder_function.hpp.
void mlpack::nn::SparseAutoencoderFunction::VisibleSize (const size_tvisible) [inline]¶
Sets size of the visible layer. Definition at line 98 of file sparse_autoencoder_function.hpp.size_t mlpack::nn::SparseAutoencoderFunction::VisibleSize () const [inline]¶
Gets size of the visible layer. Definition at line 104 of file sparse_autoencoder_function.hpp. References visibleSize.Member Data Documentation¶
double mlpack::nn::SparseAutoencoderFunction::beta [private]¶
KL divergence parameter. Definition at line 169 of file sparse_autoencoder_function.hpp. Referenced by Beta().const arma::mat& mlpack::nn::SparseAutoencoderFunction::data [private]¶
The matrix of data points. Definition at line 159 of file sparse_autoencoder_function.hpp.size_t mlpack::nn::SparseAutoencoderFunction::hiddenSize [private]¶
Size of the hidden layer. Definition at line 165 of file sparse_autoencoder_function.hpp. Referenced by HiddenSize().arma::mat mlpack::nn::SparseAutoencoderFunction::initialPoint [private]¶
Initial parameter vector. Definition at line 161 of file sparse_autoencoder_function.hpp. Referenced by GetInitialPoint().double mlpack::nn::SparseAutoencoderFunction::lambda [private]¶
L2-regularization parameter. Definition at line 167 of file sparse_autoencoder_function.hpp. Referenced by Lambda().double mlpack::nn::SparseAutoencoderFunction::rho [private]¶
Sparsity parameter. Definition at line 171 of file sparse_autoencoder_function.hpp. Referenced by Rho().size_t mlpack::nn::SparseAutoencoderFunction::visibleSize [private]¶
Size of the visible layer. Definition at line 163 of file sparse_autoencoder_function.hpp. Referenced by VisibleSize().Author¶
Generated automatically by Doxygen for MLPACK from the source code.Tue Sep 9 2014 | Version 1.0.10 |