Changeset 1077 for library/bdm/estim/mixtures.h
- Timestamp:
- 06/10/10 21:40:09 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/mixtures.h
r1066 r1077 31 31 mixture models of the following kind: 32 32 \f[ 33 f(y_t|\psi_t, \Theta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, \theta_i)33 f(y_t|\psi_t, heta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, heta_i) 34 34 \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$.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$ 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$. 36 36 37 37 The 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. … … 50 50 class MixEF: public BMEF { 51 51 protected: 52 //! Models for Components of \f$ \theta_i\f$52 //! Models for Components of \f$ heta_i\f$ 53 53 Array<BMEF*> Coms; 54 54 //! Statistics for weights … … 72 72 ////!indices of component rvc in common rvc 73 73 74 class MixEF_options: public root {74 class Options: public root { 75 75 public: 76 76 //! Flag for a method that is used in the inference … … 80 80 int max_niter; 81 81 82 MixEF_options():method(QB),max_niter(10) {};83 84 //! Settings for MixEF85 /*! 82 Options():method(QB),max_niter(10) {}; 83 84 /*! Create object from the following structure 85 86 86 \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'; 89 97 \endcode 90 98 */ … … 98 106 UI::get(max_niter,set,"max_niter",UI::optional); 99 107 }; 108 100 109 void to_setting(Setting &set)const { 101 110 string meth=(method==EM ? "EM" : "QB"); … … 105 114 }; 106 115 107 MixEF_options options;116 Options options; 108 117 public: 109 118 //! Full constructor … … 170 179 UI::save (options, set, "options"); 171 180 } 172 /*! \brief reads data from setting 181 182 /*! Create object from the following structure 183 173 184 \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 178 192 \endcode 179 193 */ … … 187 201 UIREGISTER ( MixEF ); 188 202 203 //! \brief TODO DOCUMENTATION IS MISSING HERE 189 204 class ARXprod: public ProdBMBase { 190 205 Array<shared_ptr<ARX> > arxs;