Changeset 189 for bdm/stat/emix.h

Show
Ignore:
Timestamp:
10/22/08 10:46:36 (16 years ago)
Author:
smidl
Message:

extend MixEF to allow for EM algorithm and alow estimation of weighted empirical density

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/stat/emix.h

    r183 r189  
    112112                return log(x); 
    113113        }; 
     114        mat evalpdflog_M ( const mat &Val ) const { 
     115                mat X(w.length(), Val.cols()); 
     116                for (int i = 0; i < w.length(); i++ ) { 
     117                        X.set_row(i, w ( i )*exp(Coms ( i )->evalpdflog_m ( Val ) )); 
     118                } 
     119                return X; 
     120        }; 
    114121 
    115122        emix* marginal ( const RV &rv ) const;