Segmentation based on modified Gath-Geva algorithm ppcamod.m

Syntax:
[results]=ppcamod(t,x,inic,q,niterations,timew,m)

 t Column vector Time
 x Matrix Data matrix
 inic Scalar integer or structure Initial number of segments or 
 initial parameters from  Bottom-Up algorithm
 q Scalar integer Number of principal components
 niterations Scalar integer Maximum number of iterations
 timew Boolean 0: not weighted by time
 1: weighted by time
 m Scalar real number Fuzziness parameter
 
 results Stucture Result of the segmentation

This function contains the modified fuzzy clustering algorithm for multivariate time-series segmentation based on Probabilistic Principal Component Analysis. The algorithm runs niterations number of iterations or until it reaches the stopping criteria (see the value of min_var that is equal to 10-4 by default).

The structure results contains the results:

results.W : weight matrices;
results.S : covariance matrices;
results.C : distance norms;
results.mu : cluster centers in the feature space;
results.mut : cluster centers in time;
results.szoras : variance in the feature space;
results.szorast: variance in time;
results.pc : prior probabilities of clusters (p(ηi));
results.px : p(xk | ηi) probabilities;
results.pt : p(tk | ηi) probabilities;
results.pp : p(zk | ηi) probabilities;
results.t : time (equal to input parameter t);
results.x : variables (equal to input parameter x).

The function continuously depicts the results in Figure 5 during it runs.