37#ifndef STK_IGAUSSIANMODEL_H
38#define STK_IGAUSSIANMODEL_H
52template<
class>
class IGaussianModel;
78 Real scale = 0., std = std::sqrt((
double)sigma);
80 scale = ((data-mu)/std).maxElt();
83 {
sum = (((data-mu)/std)/scale).norm2();}
84 return - ( 0.5*
sum*scale*scale
85 + data.size() * (std::log((
double)std) + Const::_LNSQRT2PI_)
151template <
class Array>
A Array2DPoint is a one dimensional horizontal container.
In this file, we define Array2DSquare class.
A Array2DVector is a one dimensional horizontal container.
In this file, we define the final class Array2D.
In this file we define the class IStatModel.
In this file we define the constant and utilities methods used in the project Model.
This file contain the functors computings statistics.
Compute the the maximum likelihood estimates of a complete Gaussian statistical model.
void compWeightedMean(ColVector const &weights)
compute the empirical weighted mean
IGaussianModel(Array const *p_data)
constructor.
virtual ~IGaussianModel()
destructor.
RowVector const & mean() const
virtual void compWeightedCovariance(ColVector const &weights)=0
compute the empirical weighted covariance matrix.
hidden::Traits< Array >::Row RowVector
RowVector mean_
Vector of the empirical means.
hidden::Traits< Array >::Col ColVector
void compMean()
compute the empirical mean
virtual void compCovariance()=0
compute the empirical covariance matrix.
IGaussianModel(Array const &data)
constructor.
IStatModel< IGaussianModel< Array > > Base
Base class for all Statistical Models [Deprecated], have been replaced by IStatModel.
Data const * p_dataij_
A pointer on the original data set.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
double Real
STK fundamental type of Real values.
hidden::FunctorTraits< Derived, MeanOp >::Row mean(Derived const &A)
Compute the mean(s) value(s) of A.
The namespace STK is the main domain space of the Statistical ToolKit project.
Real gaussianLnLikelihood(ExprBase< Vector > const &data, Real const &mu, Real const &sigma)
Compute the gaussian log likehood of a one dimensionnal gaussian model.
Arithmetic properties of STK fundamental types.