Learning from trajectories of positive-definite matrices