LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
mmap_mixture_fit_trace.m
1function [MMAP,PHs] = mmap_mixture_fit_trace(T, A)
2% Fits a MMAP with m classes using a mixture of m^2 PH-distributions.
3% Each PH distribution represents the probability distribution conditioned
4% on the fact that the last arrival was of class i and the next arrival is
5% of class j.
6%
7% INPUT
8% - T: inter-arrival times
9% - A: class labels
10% OUTPUT
11% - MMAP: the fitted MMAP
12% - PHs: the fitted PH-distributions for each transition
13
14% compute two-step transition probabilities
15P2 = mtrace_sigma2(T,A);
16
17% compute cross moments of order 1, 2 and 3
18M1 = mtrace_cross_moment(T,A,1);
19M2 = mtrace_cross_moment(T,A,2);
20M3 = mtrace_cross_moment(T,A,3);
21
22% apply fitting algorithm
23[MMAP,PHs] = mmap_mixture_fit(P2, M1, M2, M3);
24
25end % end function