1function
MMAP = mamap2m_fit_trace(T, C, fbsWeights)
2% Fits a MAPH(2,m) or A MAMAP(2,m) that matches the characteristics of the
3% trace. Three characteristics of the marked process are matched either
4% exactly or approximately. Among these, the
class probabilities are always
5% matched exactly. The remaining two characteristics, by
default, are the
6% forward and backward moments, unless the underlying AMAP(2)
is
7% degenerate. Different pairs of characteristics can be chosen by
8% specifying higher weights in the optional parameter fbsWeights.
11% - T: the inter-arrival times
12% - C: the class labels
13% - fbsWeights: the weight assigned to forward moments, backward moments
14% and class transition probabilities (default: [1, 1, 1])
16% -
MMAP: fitted MAMAP[m]
19 % by default equal weights
20 % when weights are equal, F+B
is preferred over F+S and B+S
27GAMMA = trace_gamma(T);
30F = mtrace_forward_moment(T,C,1);
31B = mtrace_backward_moment(T,C,1);
34MMAP = mamap2m_fit(M1, M2, M3, GAMMA,
P, F, B, S, fbsWeights);