Changeset 665 for library/bdm/estim/particles.h
- Timestamp:
- 10/19/09 22:24:45 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/particles.h
r660 r665 93 93 } 94 94 //! bayes I - generate samples and add their weights to lls 95 virtual void bayes_gensmp( );95 virtual void bayes_gensmp(const vec &ut); 96 96 //! bayes II - compute weights of the 97 97 virtual void bayes_weights(); … … 124 124 */ 125 125 void from_setting(const Setting &set){ 126 BM::from_setting(set); 126 127 par = UI::build<mpdf>(set,"parameter_pdf",UI::compulsory); 127 128 obs = UI::build<mpdf>(set,"observation_pdf",UI::compulsory); … … 137 138 138 139 u.add(obs_u); // join both u, and check if they do not overlap 139 140 140 141 set_drv(concat(obs->_rv(),u) ); 141 142 } … … 163 164 res_threshold=0.5; 164 165 } 166 validate(); 165 167 } 166 168 //! load prior information from set and set internal structures accordingly … … 172 174 est=*test_emp; 173 175 } else { 174 int n;176 //int n; 175 177 if (!UI::get(n,set,"n",UI::optional)){n=10;} 176 178 // sample from prior 177 179 set_statistics(ones(n)/n, *pri); 178 180 } 181 n = est._w().length(); 179 182 //validate(); 180 183 }