%%%%%%% Variational Bayesian Learning
%%%%%%% True 5 components
%%%%%%% Learner 3,4,5,6,7
clear;
clf;
close all;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
STD0=5;
STD=5; %%% %%% Standard deviation in learning machine
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
n=500;
KURIKAESHI=200; %%% Number of recursive process
%%% PRIORSIG=0.01; %%% 1/PRIORSIG = Variance of Prior
PHI0=3; %%% Hyperparameter of mixture ratio : 3/2 Kazuho's critical point
ETA0=1;
%%%%%%%%%%%%%%%%%%%%%%% True mixture ratios %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% Set True
true_ratio(1)=0.1;
true_ratio(2)=0.15;
true_ratio(3)=0.25;
true_ratio(4)=0.35;
true_ratio(5)=0.15;
true_mean(1)=10;
true_mean(2)=30;
true_mean(3)=50;
true_mean(4)=70;
true_mean(5)=90;
%%%%%%%%%%%%%%%%%%%%%%%%%%% Sample generation
for i=1:1:n
r=rand(1,1);
if(r