Show
Ignore:
Timestamp:
11/04/09 22:54:58 (15 years ago)
Author:
smidl
Message:

Making tutorial/userguide example work again (changes of mpdf and bayes)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/bdmtoolbox/tutorial/userguide/frg_estim.m

    r661 r700  
    1717%%%%%% Random walk on frg - Dirichlet  
    1818phi_pdf.class = 'mDirich';         % random walk on coefficient phi 
    19 phi_pdf.rv    = RV('phi',2);       % 2D random walk - frg is the first element 
     19phi_pdf.rv    = RV({'phi','1_phi'});       % 2D random walk - frg is the first element 
    2020phi_pdf.k     = 0.01;              % width of the random walk 
    2121phi_pdf.betac = [0.01 0.01];       % stabilizing elememnt of random walk 
     
    2626E.parameter_pdf = phi_pdf;         % Random walk is the parameter evolution model 
    2727E.res_threshold = 1.0;             % resampling parameter 
    28 E.n = 20;                          % number of particles 
     28E.n = 10;                          % number of particles 
    2929E.prior.class = 'eDirich';         % prior on non-linear part 
    3030E.prior.beta  = [2 1]; %  
     
    3636%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    3737% plot results 
    38 ndat = size(M.u,1); 
     38ndat = size(M.DS_u,1); 
    3939 
    4040figure(1); 
    4141subplot(2,2,1); 
    42 plotestimates(true_theta, M.MPFmean_theta, M.MPFlb_theta, M.MPFub_theta); 
     42plotestimates(true_theta, M.MPF_apost_mean_theta, M.MPF_apost_lb_theta, M.MPF_apost_ub_theta); 
    4343title(' Regression parameters \theta') 
    4444set(gca,'YLim',[-1.5,1]); 
    4545 
    4646subplot(2,2,2); 
    47 plotestimates(true_R, M.MPFmean_r,M.MPFlb_r,M.MPFub_r); 
     47plotestimates(true_R, M.MPF_apost_mean_r,M.MPF_apost_lb_r,M.MPF_apost_ub_r); 
    4848title('Variance parameters r') 
    4949 
    5050subplot(2,2,3); 
    51 plotestimates(1, M.MPFmean_phi(:,1),M.MPFlb_phi(:,1),M.MPFub_phi(:,1)); 
     51plotestimates(1, M.MPF_apost_mean_phi(:,1),M.MPF_apost_lb_phi(:,1),M.MPF_apost_ub_phi(:,1)); 
    5252title('Forgetting factor') 
    5353