Added implentation of the NIPALS algorithm. To be tested.