13#ifndef MLPACK_METHODS_ANN_DISTRIBUTIONS_NORMAL_DISTRIBUTION_HPP
14#define MLPACK_METHODS_ANN_DISTRIBUTIONS_NORMAL_DISTRIBUTION_HPP
17#include "../activation_functions/logistic_function.hpp"
31template <
typename DataType = arma::mat>
76 DataType& dsigma)
const;
85 void Probability(
const DataType& x, DataType& probabilities)
const
111 const DataType&
Mean()
const {
return mean; }
114 DataType&
Mean() {
return mean; }
128 template<
typename Archive>
143#include "normal_distribution_impl.hpp"
Implementation of the Normal Distribution function.
DataType & Mean()
Modify the mean.
void LogProbability(const DataType &x, DataType &probabilities) const
Calculates the log of normal probability density function for each data point (column) in the given m...
void ProbBackward(const DataType &observation, DataType &dmu, DataType &dsigma) const
Stores the gradient of the probabilities of the observations with respect to mean and standard deviat...
DataType Probability(const DataType &observation) const
Return the probabilities of the given matrix of observations.
const DataType & StandardDeviation() const
Get the standard deviation.
DataType Sample() const
Return a randomly generated observation according to the probability distribution defined by this obj...
void Probability(const DataType &x, DataType &probabilities) const
Calculates the normal probability density function for each data point (column) in the given matrix.
size_t Dimensionality() const
Return the dimensionality of this distribution.
NormalDistribution(const DataType &mean, const DataType &sigma)
Create a Normal distribution with the given mean and sigma.
DataType LogProbability(const DataType &observation) const
Return the log probabilities of the given matrix of observations.
NormalDistribution()
Default constructor, which creates a Normal distribution with zero dimension.
const DataType & Mean() const
Get the mean.
DataType & StandardDeviation()
Modify the standard deviation.
void serialize(Archive &ar, const unsigned int)
Serialize the distribution.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.