Show
Ignore:
Timestamp:
06/10/10 21:40:09 (14 years ago)
Author:
mido
Message:

another update of doc - all bayesian models until bdm::MultiModel? finished
also MixEF::MixEF_options renamed just to MixEF::Options

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/estim/mixtures.h

    r1066 r1077  
    3131mixture models of the following kind: 
    3232\f[ 
    33 f(y_t|\psi_t, \Theta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, \theta_i) 
     33f(y_t|\psi_t,     heta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t,     heta_i) 
    3434\f] 
    35 where  \f$\psi\f$ is a known function of past outputs, \f$w=[w_1,\ldots,w_n]\f$ are component weights, and component parameters \f$\theta_i\f$ are assumed to be mutually independent. \f$\Theta\f$ is an aggregation af all component parameters and weights, i.e. \f$\Theta = [\theta_1,\ldots,\theta_n,w]\f$. 
     35where  \f$\psi\f$ is a known function of past outputs, \f$w=[w_1,\ldots,w_n]\f$ are component weights, and component parameters \f$    heta_i\f$ are assumed to be mutually independent. \f$    heta\f$ is an aggregation af all component parameters and weights, i.e. \f$    heta = [    heta_1,\ldots,    heta_n,w]\f$. 
    3636 
    3737The characteristic feature of this model is that if the exact values of the latent variable were known, estimation of the parameters can be handled by a single model. For example, for the case of mixture models, posterior density for each component parameters would be a BayesianModel from Exponential Family. 
     
    5050class MixEF: public BMEF { 
    5151protected: 
    52     //! Models for Components of \f$\theta_i\f$ 
     52    //! Models for Components of \f$    heta_i\f$ 
    5353    Array<BMEF*> Coms; 
    5454    //! Statistics for weights 
     
    7272    ////!indices of component rvc in common rvc 
    7373 
    74     class MixEF_options: public root { 
     74    class Options: public root { 
    7575    public: 
    7676        //! Flag for a method that is used in the inference 
     
    8080        int max_niter; 
    8181 
    82         MixEF_options():method(QB),max_niter(10) {}; 
    83  
    84         //! Settings for MixEF 
    85         /*! 
     82        Options():method(QB),max_niter(10) {}; 
     83 
     84         /*! Create object from the following structure 
     85 
    8686        \code 
    87         method = "EM";               % or QB (default) 
    88         max_iter = 10;               % maximum number of iterations 
     87        --- optional fields ---         
     88        method = '...';            % 'EM' or 'QB', methods of computing bayes 
     89        max_iter = [];             % maximum number of iterations in bayes_batch 
     90        --- inherited fields --- 
     91        bdm::root::from_setting 
     92        \endcode 
     93        If the optional fields are not given, they will be filled as follows: 
     94        \code 
     95        max_niter = 10;             
     96        method = 'QB'; 
    8997        \endcode 
    9098        */ 
     
    98106            UI::get(max_niter,set,"max_niter",UI::optional); 
    99107        }; 
     108 
    100109        void to_setting(Setting &set)const { 
    101110            string meth=(method==EM ? "EM" : "QB"); 
     
    105114    }; 
    106115 
    107     MixEF_options options; 
     116    Options options; 
    108117public: 
    109118    //! Full constructor 
     
    170179        UI::save (options, set, "options"); 
    171180    } 
    172     /*! \brief reads data from setting 
     181 
     182    /*! Create object from the following structure 
     183 
    173184    \code 
    174     Coms = {struct('class',"BMEF..."),...};           % Components - Bayesian models (BM) 
    175     weights = [0.2, 0.3,...];                         % weights 
    176     options.method = "EM" or "QB";                    % methods of computing bayes 
    177     options.max_iter = 10;                            % maximum number of iterations in bayes_batch 
     185    class = 'MixEF'; 
     186    Coms = { list of bdm::BMEF };                    % list of components containing any offsprings of Bayesian models BMEF, bdm::BMEF::from_setting 
     187    weights = [...];                                 % vector containing weights of components 
     188    --- optional fields --- 
     189    options = configuration of bdm::MixEF::Options;  % see MixEF::Options, bdm::MixEF::Options::from_setting 
     190    --- inherited fields --- 
     191    bdm::BMEF::from_setting 
    178192    \endcode 
    179193    */ 
     
    187201UIREGISTER ( MixEF ); 
    188202 
     203//! \brief TODO DOCUMENTATION IS MISSING HERE 
    189204class ARXprod: public ProdBMBase { 
    190205    Array<shared_ptr<ARX> > arxs;