Changeset 970

Show
Ignore:
Timestamp:
05/23/10 11:39:58 (14 years ago)
Author:
smidl
Message:

Student + arx corrections

Location:
library
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/estim/arx_ext.h

    r804 r970  
    5555        \code 
    5656        class = 'ARXg'; 
    57         rv    = RV({names_of_dt} )                 // description of output variables 
     57        yrv   = RV({names_of_dt} )                 // description of output variables 
    5858        rgr   = RV({names_of_regressors}, [-1,-2]} // description of regressor variables 
    5959        constant = 1;                              // 0/1 switch if the constant term is modelled or not 
     
    6464        alternative = {class='egiw',...};          // Alternative density in stabilized estimation, when not given prior is used 
    6565 
    66         frg = 1.0;                                 // forgetting, default frg=1.0 
     66        frg   = 1.0;                               // forgetting, default frg=1.0 
    6767 
    68         rv_param   = RV({names_of_parameters}}     // description of parametetr names 
    69                                                                                            // default: ["theta_i" and "r_i"] 
     68        rv    = RV({names_of_parameters}}          // description of parametetr names 
    7069        \endcode 
    7170        */ 
  • library/bdm/stat/exp_family.cpp

    r957 r970  
    298298 
    299299void egiw::log_register ( bdm::logger& L, const string& prefix ) { 
    300         if ( log_level[logmean] || log_level[logvariance] ) {  
    301                 root::log_register ( L, prefix ); 
    302                 int th_dim = dimension() - dimx * ( dimx + 1 ) / 2; 
    303  
    304                 if ( log_level[logmean] ) 
    305                         L.add_vector( log_level, logmean, RV ( th_dim ), prefix );  
    306                 if ( log_level[logvariance] ) 
    307                         L.add_vector( log_level, logvariance, RV ( th_dim * th_dim ), prefix ); 
    308         } else { 
    309                 epdf::log_register ( L, prefix ); 
     300        epdf::log_register ( L, prefix ); 
     301        if ( log_level[logvartheta] ) {  
     302                int th_dim = dim - dimx*dimx; // dimension - dimension of cov 
     303                L.add_vector( log_level, logvartheta, RV ( th_dim ), prefix );  
    310304        } 
    311305} 
    312306 
    313307void egiw::log_write() const { 
    314         if ( log_level[logmean] || log_level[logvariance] ) {  
     308        epdf::log_write(); 
     309        if ( log_level[logvartheta] ) {  
    315310                mat M; 
    316311                ldmat Lam; 
    317312                ldmat Vz; 
    318313                factorize ( M, Vz, Lam ); 
    319                 if( log_level[logmean] ) 
    320                         log_level.store( logmean, est_theta() ); 
    321                 if( log_level[logvariance] ) 
    322                         log_level.store( logvariance, cvectorize ( est_theta_cov().to_mat() ) ); 
    323         } else { 
    324                 epdf::log_write(); 
     314                if( log_level[logvartheta] ) 
     315                        log_level.store( logvartheta, cvectorize ( est_theta_cov().to_mat() ) ); 
    325316        } 
    326317} 
  • library/bdm/stat/exp_family.h

    r964 r970  
    296296                 
    297297                vec mean() const {return mu;} 
    298                 mat covariance() const {return delta/(delta-2)*H.to_mat();} 
     298                mat covariance() const { 
     299                        return delta/(delta-2)*H.to_mat(); 
     300                } 
    299301                vec variance() const {return diag(covariance());} 
    300302                        //! \name access 
     
    338340*/ 
    339341class egiw : public eEF { 
    340         //! \var log_level_enums logvariance 
    341         //! TODO DOPLNIT 
    342  
    343         //! \var log_level_enums logmean 
    344         //! TODO DOPLNIT 
    345         LOG_LEVEL(egiw,logmean, logvariance); 
     342        //! \var log_level_enums logvartheta 
     343        //! Log variance of the theta part  
     344 
     345        LOG_LEVEL(egiw,logvartheta); 
    346346 
    347347protected: 
  • library/tests/testsuite/estudent.cfg

    r802 r970  
    66         mu = [1]; 
    77    H = ( "matrix", 1, 1, [ 1.0 ] ); 
    8     delta = 3.0; 
     8    delta = 6.0; 
    99  }; 
    1010  mean = [1]; 
    11   variance = [3.0]; 
    12   R = ("matrix",1,1,[3.0]); 
     11  variance = [1.5]; 
     12  R = ("matrix",1,1,[1.5]); 
    1313  support = { 
    1414        class = "rectangular_support"; 
    15         ranges = ( [ -12.0, 12.0 ] ); 
     15        ranges = ( [ -10.0, 12.0 ] ); 
    1616        gridsizes = [ 100 ]; 
    1717        };