public INDArray convertBackToFeatures ( INDArray data ) { return Nd4j . tensorMmul ( eigenvectors , data , new int [ ] [ ] { { 1 } , { 1 } } ) . transposei ( ) . addiRowVector ( mean ) ; }
Take the data that has been transformed to the principal components about the mean and transform it back into the original feature set . Make sure to fill in zeroes in columns where components were dropped!