37#ifndef STK_JOINTBERNOULLIMODEL_H
38#define STK_JOINTBERNOULLIMODEL_H
104template <
class Array,
class WColVector = CVectorX>
109 typedef typename Array::Type
Type;
133 {
return p_data()->sizeCols();}
In this file we define the class IMultiStatModel.
In this file we define the Bernoulli distribution.
Derived & resize(Range const &I, Range const &J)
resize the array.
Interface base class for the parameters of a multivariate model.
Range const & range() const
Interface base class for all Multivariate Statistical Models.
hidden::StatModelTraits< Derived >::WColVector WColVector
Type of the vector with the weights.
Data const *const p_data() const
A joint Bernoulli model is a statistical model of the form: following form.
virtual void computeParameters()
compute the parameters
JointBernoulliModel(Array const *p_data)
Constructor with a ptr on the data set.
virtual int computeNbFreeParameters() const
compute the number of free parameters
hidden::Traits< Array >::Row RowVector
Type of the row vector of the container.
Array::Type Type
Type of the data contained in the container.
virtual Real computeLnLikelihood(RowVector const &rowData) const
compute the log Likelihood of an observation.
JointBernoulliModel()
default constructor.
JointBernoulliModel(Array const &data)
Constructor with data set.
Data const *const p_data() const
virtual ~JointBernoulliModel()
destructor
JointBernoulliModel(JointBernoulliModel const &model)
Copy constructor.
virtual void computeParameters(WColVector const &weights)
compute the weighted parameters
IMultiStatModel< Array, WColVector, JointBernoulliParameters > Base
Base class.
hidden::Traits< Array >::Col ColVector
Type of the column vector of the container.
JointBernoulliModel * clone() const
clone pattern.
Structure encapsulating the parameters of a Joint Bernoulli model.
JointBernoulliParameters(Range const &size)
constructor with fixed size
Real const ln1mProb(int const &j) const
Real const prob(int const &j) const
JointBernoulliParameters()
default constructor
Real const lnProb(int const &j) const
Array2DPoint< Real > prob_
Array2DPoint< Real > ln1mProb_
~JointBernoulliParameters()
destructor
JointBernoulliParameters(JointBernoulliParameters const ¶m)
copy constructor.
void resizeImpl(Range const &range)
resize the set of parameter
void setProb(int const &j, Real const &prob)
set the probability of success of the jth law
Array2DPoint< Real > lnProb_
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Index sub-vector region: Specialization when the size is unknown.
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
@ binaryNA_
Not Available value.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
Arithmetic properties of STK fundamental types.