STK++ 0.9.13
|
A Bernoulli model, is a statistical model of the following form. More...
#include <STK_BernoulliModel.h>
Public Types | |
typedef Array::Type | Type |
Type of the data contained in the container. | |
typedef IUnivStatModel< Array, WColVector, Law::Bernoulli > | Base |
Base class. | |
![]() | |
typedef ColVector::Type | Type |
Type of the data contained in the container. | |
typedef IRunnerUnsupervised< Array, WColVector > | Runner |
Type of the Runner. | |
Public Member Functions | |
BernoulliModel () | |
default constructor. | |
BernoulliModel (Array const &data) | |
Constructor with data set. | |
BernoulliModel (Array const *p_data) | |
Constructor with a ptr on the data set. | |
BernoulliModel (BernoulliModel const &model) | |
Copy constructor. | |
BernoulliModel * | clone () const |
clone patern | |
virtual | ~BernoulliModel () |
destructor | |
virtual int | computeNbFreeParameters () const |
compute the number of free parameters | |
![]() | |
virtual | ~IUnivStatModel () |
destructor | |
Real | computeLnLikelihood () const |
compute the log Likelihood of the statistical model. | |
Law::Bernoulli const & | law () const |
virtual bool | run () |
Estimate the parameters of the model and update the. | |
virtual bool | run (WColVector const &weights) |
compute the weighted empirical probability of success based on the observed variables. | |
![]() | |
int | nbSample () const |
Real | lnNbSample () const |
int | nbVariable () const |
Real | lnLikelihood () const |
Real | likelihood () const |
int | nbFreeParameter () const |
Real | computeBIC () const |
Real | computeAIC () const |
Real | computeML () const |
![]() | |
Array const * | p_data () const |
get the data set | |
virtual void | setData (Array const *p_data) |
Set the data set. | |
virtual void | setData (Array const &data) |
Set the data set. | |
virtual bool | run (Weights_ const &weights)=0 |
run the weighted computations. | |
![]() | |
String const & | error () const |
get the last error message. | |
Protected Member Functions | |
virtual void | computeParameters () |
compute the empirical probability of success based on the observed variables. | |
virtual void | computeParameters (WColVector const &weights) |
compute the weighted empirical probability of success based on the observed variables. | |
![]() | |
IUnivStatModel () | |
default constructor. | |
IUnivStatModel (Array const &data) | |
Constructor with data set. | |
IUnivStatModel (Array const *p_data) | |
Constructor with a ptr on the data set. | |
IUnivStatModel (IUnivStatModel const &model) | |
Copy constructor. | |
virtual void | update () |
This virtual method will be called if the user set a new data set. | |
![]() | |
IStatModelBase () | |
Default constructor. | |
IStatModelBase (int nbSample) | |
Constructor with specified dimension. | |
IStatModelBase (int nbSample, int nbVariable) | |
Constructor with specified dimension. | |
IStatModelBase (IStatModelBase const &model) | |
Copy constructor. | |
~IStatModelBase () | |
destructor | |
void | setNbFreeParameter (int const &nbFreeParameter) |
set the number of free parameters of the model | |
void | setNbSample (int const &nbSample) |
set the number of samples of the model | |
void | setNbVariable (int const &nbVariable) |
set the number of variables of the model | |
void | setLnLikelihood (Real const &lnLikelihood) |
set the log-likelihood of the model | |
void | initialize (int nbSample, int nbVariable) |
set the dimensions of the parameters of the model | |
![]() | |
IRunnerUnsupervised () | |
default constructor. | |
IRunnerUnsupervised (Array const *const p_data) | |
constructor with a pointer on the constant data set | |
IRunnerUnsupervised (Array const &data) | |
constructor with a constant reference on the data set | |
IRunnerUnsupervised (IRunnerUnsupervised const &runner) | |
copy constructor | |
~IRunnerUnsupervised () | |
destructor | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
Additional Inherited Members | |
![]() | |
Law::Bernoulli | law_ |
The probability law of the model. | |
![]() | |
Array const * | p_data_ |
A pointer on the original data set. | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
A Bernoulli model, is a statistical model of the following form.
Definition at line 57 of file STK_BernoulliModel.h.
typedef IUnivStatModel<Array, WColVector, Law::Bernoulli> STK::BernoulliModel< Array, WColVector >::Base |
Base class.
Definition at line 65 of file STK_BernoulliModel.h.
typedef Array::Type STK::BernoulliModel< Array, WColVector >::Type |
Type of the data contained in the container.
Definition at line 63 of file STK_BernoulliModel.h.
|
inline |
default constructor.
Definition at line 67 of file STK_BernoulliModel.h.
Referenced by STK::BernoulliModel< Array, WColVector >::clone().
|
inline |
|
inline |
Constructor with a ptr on the data set.
Definition at line 71 of file STK_BernoulliModel.h.
|
inline |
|
inlinevirtual |
|
inline |
clone patern
Definition at line 75 of file STK_BernoulliModel.h.
References STK::BernoulliModel< Array, WColVector >::BernoulliModel().
|
inlinevirtual |
compute the number of free parameters
Implements STK::IUnivStatModel< Array, WColVector, Law::Bernoulli >.
Definition at line 79 of file STK_BernoulliModel.h.
|
inlineprotectedvirtual |
compute the empirical probability of success based on the observed variables.
The NA values are discarded.
Implements STK::IUnivStatModel< Array, WColVector, Law::Bernoulli >.
Definition at line 85 of file STK_BernoulliModel.h.
References STK::binaryNA_, STK::IUnivStatModel< Array, WColVector, Law::Bernoulli >::law_, STK::IRunnerUnsupervised< Array, Weights_ >::p_data(), STK::Law::Bernoulli::setProb(), and STK::sum().
|
inlineprotectedvirtual |
compute the weighted empirical probability of success based on the observed variables.
The NA values are discarded.
Implements STK::IUnivStatModel< Array, WColVector, Law::Bernoulli >.
Definition at line 97 of file STK_BernoulliModel.h.
References STK::binaryNA_, STK::IUnivStatModel< Array, WColVector, Law::Bernoulli >::law_, STK::IRunnerUnsupervised< Array, Weights_ >::p_data(), STK::Law::Bernoulli::setProb(), and STK::sum().