Show
Ignore:
Timestamp:
05/27/10 23:07:16 (14 years ago)
Author:
smidl
Message:

changes in bayes_batch

Files:
1 modified

Legend:

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

    r1003 r1009  
    8888                bayes_weighted ( yt, cond, 1.0 ); 
    8989        }; 
    90         double logpred ( const vec &yt ) const; 
     90        double logpred ( const vec &yt, const vec &cond ) const; 
    9191        void flatten ( const BMEF* B ); 
    9292        //! Conditioned version of the predictor 
     
    103103        //! Smarter structure estimation by Ludvik Tesar.\return indices of accepted regressors. 
    104104        ivec structure_est_LT ( const egiw &Eg0 ); 
    105         //! reduce to 
     105        //! reduce structure to the given ivec of matrix V 
    106106        void reduce_structure(ivec &inds_in_V){ 
    107107                ldmat V = posterior()._V(); 
     
    110110                ldmat newV(V,inds_in_V); 
    111111                est.set_parameters(dimy,newV, posterior()._nu()); 
     112                 
     113                if (have_constant){ 
     114                        ivec rgr_elem= find(inds_in_V<(V.rows()-1)); // < -- find non-constant  
     115                        rgr = rgr.subselect(rgr_elem); 
     116                        rgrlen = rgr_elem.length(); 
     117                } else{ 
     118                        rgr = rgr.subselect(inds_in_V); 
     119                } 
    112120                validate(); 
    113121        } 
     
    184192                 
    185193        }  
     194        //! access function 
     195        RV & _rgr() {return rgr;} 
     196        bool _have_constant() {return have_constant;} 
     197        int _rgrlen() {return rgrlen;} 
    186198}; 
    187199UIREGISTER ( ARX );