Changeset 924
- Timestamp:
- 05/05/10 20:51:26 (15 years ago)
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/tutorial/userguide/frg_estim.m
r904 r924 11 11 A1.rv = y; 12 12 A1.rgr = RVtimes([y,u],[-3,-1]) ; 13 A1.log_level = 'logbounds ,logevidence';13 A1.log_level = 'logbounds'; 14 14 A1.frg = 0.98; 15 15 A1.name = 'A1'; … … 35 35 E.prior.class = 'eDirich'; % prior on non-linear part 36 36 E.prior.beta = [2 1]; % 37 E.log_level = 'logbounds ,logevidence';37 E.log_level = 'logbounds'; 38 38 E.name = 'MPF'; 39 39 … … 42 42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 43 43 % plot results 44 ndat = size(M.DS_ u,1);44 ndat = size(M.DS_dt_u,1); 45 45 46 46 figure(1); 47 47 subplot(2,2,1); 48 plotestimates(true_theta, M.MPF_apost_mean_theta, M.MPF_apost_lb _theta, M.MPF_apost_ub_theta);48 plotestimates(true_theta, M.MPF_apost_mean_theta, M.MPF_apost_lbound_theta, M.MPF_apost_ubound_theta); 49 49 title(' Regression parameters \theta') 50 50 set(gca,'YLim',[-1.5,1]); 51 51 52 52 subplot(2,2,2); 53 plotestimates(true_R, M.MPF_apost_mean_r,M.MPF_apost_lb _r,M.MPF_apost_ub_r);53 plotestimates(true_R, M.MPF_apost_mean_r,M.MPF_apost_lbound_r,M.MPF_apost_ubound_r); 54 54 title('Variance parameters r') 55 55 56 56 subplot(2,2,3); 57 plotestimates(1, M.MPF_apost_mean_phi(:,1),M.MPF_apost_lb _phi(:,1),M.MPF_apost_ub_phi(:,1));57 plotestimates(1, M.MPF_apost_mean_phi(:,1),M.MPF_apost_lbound_phi(:,1),M.MPF_apost_ubound_phi(:,1)); 58 58 title('Forgetting factor') 59 59 -
library/bdm/base/datasources.cpp
r910 r924 44 44 // DS::validate() has to be called after the dtsize attribute is set to proper value 45 45 DS::validate(); 46 log_level[logut]=0; 46 47 } 47 48 -
library/bdm/base/datasources.h
r910 r924 53 53 void set_drv ( const RV &drv, const RV &urv ) 54 54 { 55 if (urv._dsize()>0){ 55 56 bdm_error ( "MemDS::urv is not supported" ); 57 } else { 58 DS::set_drv(drv,urv); 59 } 60 56 61 } 57 62 58 63 void write ( const vec &ut ) { 59 bdm_error ( "MemDS::write is not supported" ); 64 if (ut.size()>0){ 65 bdm_error ( "MemDS::write is not supported" ); 66 } 60 67 } 61 68 62 69 void write ( const vec &ut, const ivec &indices ) { 63 bdm_error ( "MemDS::write is not supported" ); 70 if (ut.size()>0){ 71 bdm_error ( "MemDS::write is not supported" ); 72 } 64 73 } 65 74 -
library/bdm/stat/exp_family.h
r907 r924 1071 1071 1072 1072 set_parameters ( g, R ); 1073 validate();1073 //validate(); 1074 1074 } 1075 1075 void validate() { 1076 bdm_assert ( g->dimension() == this->dimension(), "incompatible function" ); 1076 this->iepdf.validate(); 1077 bdm_assert ( g->dimension() == this->iepdf.dimension(), "incompatible function" ); 1077 1078 this->dim = g->dimension(); 1078 1079 this->dimc = g->dimensionc();