forked from OHBA-analysis/HMM-MAR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
episodichmm.m
24 lines (22 loc) · 883 Bytes
/
episodichmm.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function [ehmm, Gamma, GammaInit, crithist] = episodichmm (data,T,options)
%
% Train Hidden Markov Model using using Variational Framework
%
% INPUTS
% data observations; either a struct with X (time series)
% or a matrix containing the time series,
% or a list of file names
% T length of series
% options structure with the training options - see documentation in
% https://github.com/OHBA-analysis/HMM-MAR/wiki
%
% OUTPUTS
% ehmm estimated ehmm model
% Gamma estimated p(state | data)
% GammaInit The HMM-initialised Gamma that is fed to the ehmm inference
%
% Author: Diego Vidaurre,
% CFIN, Aarhus University / OHBA, University of Oxford (2021)
options.episodic = true;
[ehmm, Gamma, ~, crithist, GammaInit] = hmmmar(data,T,options);
end