Implementation for Principal Component Analysis algorithm