Modeling and classification of trajectories based on a Gaussian process decomposition into discrete components