Statitics collecting, LDA and PCA

TODO: Recover LICENCE