matlab hmm Bayesian hidden Markov model implementation

Original link: http://tecdat.cn/?p=7973

 

Bayesian probabilistic model is a hidden Markov model for segmenting continuous multi-variable data. This model explains the data generated as a series of hidden. Each state is heavy tailed distribution of finite mixture having a specific mixing ratio and a state shared location / dispersion parameter.

All parameters in the model equipped with conjugate prior distribution, and by varying the Bayesian (the vB) inference learning algorithm, which is essentially similar to maximize desirable. The algorithm is robust to outliers and missing values ​​may be acceptable.

 Article generates a sequence parameter set of data from unknown BRHMM, and estimate their models generated only from these data. The results are plotted as time series 

 

 Number setting state, symbols and features 

NumState=2;

NumSym=3;

NumFeat=5;

 Set the number of sequences, each point, and missing values 

NumSeq=2;

NumPoint=100;

NumMiss=20;

 Set parameter generation options. TransParam = 1/5 

EmissParam=1/5;

LocParam=2;

DispParam=5;

 Set Sampling Options 

NumDeg=5;

NumObs=1000;

 Print and display status 

fprintf('\n')

fprintf('Sampling data ... ')

 Generating parameters for sampling 

[Trans,Emiss,Loc,Disp]=GenParam(NumState,NumSym,NumFeat,...

TransParam,EmissParam,LocParam,DispParam);

 Create a model for sampling 

Obj= bhnn(NumState,NumSym,NumFeat);

 Setting hyperparameter 

Obj.TransWeight=Trans;

Obj.TransStren(:)=NumObs;

Obj.EmissWeight=Emiss;

Obj.EmissStren(:)=NumObs;

Obj.CompLoc=Loc;

Obj.CompScale(:)=NumObs;

Obj.CompDisp=Disp;

Obj.CompPrec(:)=max(NumObs,NumFeat);

 Random sampling data and delete the value 

 update status 

fprintf('Done\n')

fprintf('Estimating model ... ')

 Creating estimation model 

Obj=BHMM(NumState,NumSym,NumFeat);

 Constraints transition parameters 

Obj.TransWeight=Trans;

Obj.TransStren(:)=NumObs;

 And state probability estimation model 

 update status 

 

 Draw results 

% 更新状态 
fprintf('Done\n')

fprintf('\n')

end

  

 

If you have any questions, please leave a comment below. 

 

 

  

Big Data tribe  - Chinese professional third-party data service providers to provide customized one-stop data mining and statistical analysis consultancy services

Statistical analysis and data mining consulting services: y0.cn/teradat (Consulting Services, please contact the official website customer service )

Click here to send me a messageQQ:3025393450

 

QQ exchange group: 186 388 004 

[Service] Scene  

Research; the company outsourcing; online and offline one training; data reptile collection; academic research; report writing; market research.

[Tribe] big data to provide customized one-stop data mining and statistical analysis consultancy

Welcome to elective our R language data analysis will be mining will know the course!

  

Big Data tribe  - Chinese professional third-party data service providers to provide customized one-stop data mining and statistical analysis consultancy services

Statistical analysis and data mining consulting services: y0.cn/teradat (Consulting Services, please contact the official website customer service )

Click here to send me a messageQQ:3025393450

 

QQ exchange group: 186 388 004 

[Service] Scene  

Research; the company outsourcing; online and offline one training; data reptile collection; academic research; report writing; market research.

[Tribe] big data to provide customized one-stop data mining and statistical analysis consultancy

Welcome to elective our R language data analysis will be mining will know the course!

Guess you like

Origin www.cnblogs.com/tecdat/p/11729183.html