GSPCA supervised PCA by E. Mirkes. See MATLAB version https://github.com/Mirkes/SupervisedPCA/blob/master/