add principal component analysis algorithm