Changeset 1167
- Timestamp:
- 08/27/10 17:05:47 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/particles.h
r1085 r1167 136 136 } 137 137 138 void to_setting(Setting &set) {138 void to_setting(Setting &set)const { 139 139 MarginalizedParticleBase::to_setting(set); 140 140 UI::save(par,set,"parameter_pdf"); 141 UI::save(bm,set,"bm"); 141 142 } 142 143 void validate() { … … 382 383 dimy = bm0->dimensiony(); 383 384 } 385 386 void to_setting(Setting &set) const{ 387 BM::to_setting(set); 388 UI::save(particles, set,"particles"); 389 UI::save(w,set,"w"); 390 } 384 391 385 392 void log_register ( bdm::logger& L, const string& prefix ) { … … 541 548 }; 542 549 void bayes(const vec &dt, const vec &cond) { 543 shared_ptr<epdf> pred_v=bm->epredictor(); 544 545 vec vt=pred_v->sample(); 550 //shared_ptr<epdf> pred_v=bm->epredictor(); 551 552 //vec vt=pred_v->sample(); 553 vec vt = bm->samplepred(); 546 554 547 555 //new sample … … 561 569 cond2fy.filldown(cond,fy_args); 562 570 563 ll= bm->_ll() +fy->evallogcond(dt,fy_args);571 ll= fy->evallogcond(dt,fy_args); 564 572 } 565 573 void from_setting(const Setting &set) { … … 575 583 576 584 } 585 void to_setting (Setting &set) const { 586 MarginalizedParticleBase::to_setting(set); //reads bm, yrv,rvc, bm_rv, etc... 587 UI::save(g,set,"g"); 588 UI::save(fy,set,"fy"); 589 UI::save(bm,set,"bm"); 590 } 577 591 void validate() { 578 592 MarginalizedParticleBase::validate();