Changeset 924

Show
Ignore:
Timestamp:
05/05/10 20:51:26 (14 years ago)
Author:
smidl
Message:

correction in MemDS and mgnorm

Files:
4 modified

Legend:

Unmodified
Added
Removed
  • applications/bdmtoolbox/tutorial/userguide/frg_estim.m

    r904 r924  
    1111A1.rv = y; 
    1212A1.rgr = RVtimes([y,u],[-3,-1]) ;  
    13 A1.log_level = 'logbounds,logevidence'; 
     13A1.log_level = 'logbounds'; 
    1414A1.frg = 0.98; 
    1515A1.name = 'A1'; 
     
    3535E.prior.class = 'eDirich';         % prior on non-linear part 
    3636E.prior.beta  = [2 1]; %  
    37 E.log_level = 'logbounds,logevidence'; 
     37E.log_level = 'logbounds'; 
    3838E.name = 'MPF'; 
    3939 
     
    4242%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    4343% plot results 
    44 ndat = size(M.DS_u,1); 
     44ndat = size(M.DS_dt_u,1); 
    4545 
    4646figure(1); 
    4747subplot(2,2,1); 
    48 plotestimates(true_theta, M.MPF_apost_mean_theta, M.MPF_apost_lb_theta, M.MPF_apost_ub_theta); 
     48plotestimates(true_theta, M.MPF_apost_mean_theta, M.MPF_apost_lbound_theta, M.MPF_apost_ubound_theta); 
    4949title(' Regression parameters \theta') 
    5050set(gca,'YLim',[-1.5,1]); 
    5151 
    5252subplot(2,2,2); 
    53 plotestimates(true_R, M.MPF_apost_mean_r,M.MPF_apost_lb_r,M.MPF_apost_ub_r); 
     53plotestimates(true_R, M.MPF_apost_mean_r,M.MPF_apost_lbound_r,M.MPF_apost_ubound_r); 
    5454title('Variance parameters r') 
    5555 
    5656subplot(2,2,3); 
    57 plotestimates(1, M.MPF_apost_mean_phi(:,1),M.MPF_apost_lb_phi(:,1),M.MPF_apost_ub_phi(:,1)); 
     57plotestimates(1, M.MPF_apost_mean_phi(:,1),M.MPF_apost_lbound_phi(:,1),M.MPF_apost_ubound_phi(:,1)); 
    5858title('Forgetting factor') 
    5959 
  • library/bdm/base/datasources.cpp

    r910 r924  
    4444        // DS::validate() has to be called after the dtsize attribute is set to proper value 
    4545        DS::validate(); 
     46        log_level[logut]=0; 
    4647} 
    4748 
  • library/bdm/base/datasources.h

    r910 r924  
    5353        void set_drv ( const RV &drv, const RV &urv ) 
    5454        { 
     55                if (urv._dsize()>0){ 
    5556                bdm_error ( "MemDS::urv is not supported" ); 
     57                } else { 
     58                        DS::set_drv(drv,urv); 
     59                } 
     60                         
    5661        } 
    5762 
    5863        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                } 
    6067        } 
    6168 
    6269        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                } 
    6473        } 
    6574 
  • library/bdm/stat/exp_family.h

    r907 r924  
    10711071 
    10721072                set_parameters ( g, R ); 
    1073                 validate(); 
     1073                //validate(); 
    10741074        } 
    10751075        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" ); 
    10771078                this->dim = g->dimension(); 
    10781079                this->dimc = g->dimensionc();