Changeset 1014 for applications/bdmtoolbox/tutorial/userguide
- Timestamp:
- 05/27/10 23:07:57 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/tutorial/userguide/mixef_basic.m
r1013 r1014 5 5 com.rgr = RV({},[],[]); 6 6 7 Data = [randn(2,50) randn(2,50)+ 10*ones(2,50)];7 Data = [randn(2,50) randn(2,50)+[5*ones(1,50); 10*ones(1,50)]]; 8 8 9 [Mix0,P0]=mixef_init(Data,com );9 [Mix0,P0]=mixef_init(Data,com,4); 10 10 % show predictor 11 11 … … 16 16 hold on 17 17 epdf_2dplot(Pred); 18 hold on 19 for i=1:length(Pred.pdfs) 20 mea=epdf_mean(Pred.pdfs{i}); 21 plot(mea(1),mea(2),'+r'); 22 end 18 23 19 24 % Do Quasi Bayes … … 32 37 % normalize weights 33 38 w = exp(log_w_nn-max(log_w_nn)); 34 w = w/sum(w) 39 w = w/sum(w); 35 40 36 41 for c=1:n … … 56 61 epdf_2dplot(PredQB); 57 62 63 PredQBc = bm_epredictor(MixQBc); 64 figure(3); 65 hold off 66 plot(Data(1,:), Data(2,:),'.'); 67 hold on 68 epdf_2dplot(PredQBc); 69 58 70 %% relations between components 59 71 Batta_dist=zeros(n);