// build in-memory data matrix A
Matrix a = new DenseMatrix(sampleData.size(), sampleDimension);
int i = 0;
for (VectorWritable vw : sampleData) {
a.assignRow(i++, vw.get());
}
// extract the eigenvectors into P
Matrix p = new DenseMatrix(39, desiredRank - 1);
FileSystem fs = FileSystem.get(cleanEigenvectors.toUri(), conf);
SequenceFile.Reader reader = new SequenceFile.Reader(fs, cleanEigenvectors, conf);