emix Class Reference

Mixture of epdfs. More...

#include <emix.h>

Inheritance diagram for emix:

Inheritance graph
[legend]
Collaboration diagram for emix:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 emix (RV &rv)
 Default constructor.
void set_parameters (const vec &w, const Array< epdf * > &Coms)
 Set weights w and components R.
vec sample () const
 Returns the required moment of the epdf.
vec mean () const
 return expected value
double evalpdflog (const vec &val) const
 Compute log-probability of argument val.
vec & _w ()
 returns a pointer to the internal mean value. Use with Care!
virtual mat sample (int N) const
 Returns N samples from density $epdf(rv)$.
virtual double eval (const vec &val) const
 Compute probability of argument val.
RV _rv () const
 access function

Protected Attributes

vec w
 weights of the components
Array< epdf * > Coms
 Component (epdfs).
RV rv
 Identified of the random variable.


Detailed Description

Mixture of epdfs.

Density function:

\[ f(x) = \sum_{i=1}^{n} w_{i} f_i(x), \quad \sum_{i=1}^n w_i = 1. \]

where $f_i(x)$ is any density on random variable $x$, called component,


Member Function Documentation

vec emix::sample (  )  const [virtual]

Returns the required moment of the epdf.

Returns a sample, $x$ from density $epdf(rv)$

Implements epdf.

References Coms, and w.


The documentation for this class was generated from the following files:

Generated on Fri May 9 23:06:41 2008 for mixpp by  doxygen 1.5.5