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/mixtures.h

    r1004 r1009  
    6363        MixEF_METHOD method; 
    6464 
     65        //! maximum number of iterations 
     66        int max_niter; 
    6567public: 
    6668        //! Full constructor 
    6769        MixEF ( const Array<BMEF*> &Coms0, const vec &alpha0 ) : 
    6870                        BMEF ( ), Coms ( Coms0.length() ), 
    69                         weights (), est(*this), method ( QB ) { 
     71                        weights (), est(*this), method ( QB ), max_niter(10) { 
    7072                for ( int i = 0; i < Coms0.length(); i++ ) { 
    7173                        Coms ( i ) = ( BMEF* ) Coms0 ( i )->_copy(); 
     
    7880        MixEF () : 
    7981                        BMEF ( ), Coms ( 0 ), 
    80                         weights (), est(*this), method ( QB ) { 
     82                        weights (), est(*this), method ( QB ), max_niter(10) { 
    8183        } 
    8284        //! Copy constructor 
    8385        MixEF ( const MixEF &M2 ) : BMEF ( ),  Coms ( M2.Coms.length() ), 
    84                         weights ( M2.weights ), est(*this), method ( M2.method ) { 
     86                        weights ( M2.weights ), est(*this), method ( M2.method ), max_niter(M2.max_niter) { 
    8587                for ( int i = 0; i < M2.Coms.length(); i++ ) { 
    8688                        Coms ( i ) = (BMEF*) M2.Coms ( i )->_copy(); 
     
    99101        void bayes ( const mat &yt, const vec &cond ); 
    100102        //! batch weighted Bayes rule 
    101         void bayes_batch ( const mat &yt, const mat &cond, const vec &wData ); 
    102         double logpred ( const vec &yt ) const; 
     103        double bayes_batch ( const mat &yt, const mat &cond, const vec &wData ); 
     104        double logpred ( const vec &yt, const vec &cond ) const; 
    103105        //! return correctly typed posterior (covariant return) 
    104106        const eprod_mix& posterior() const {