Using mapPartitions
Computing whitening from scratch