ParameteredGeneralizations.configureParameters(this, jobConf);
}
try {
if (inverseCovarianceFile.get() != null) {
FileSystem fs = FileSystem.get(inverseCovarianceFile.get().toUri(), jobConf);
MatrixWritable inverseCovarianceMatrix =
ClassUtils.instantiateAs((Class<? extends MatrixWritable>) matrixClass.get(), MatrixWritable.class);
if (!fs.exists(inverseCovarianceFile.get())) {
throw new FileNotFoundException(inverseCovarianceFile.get().toString());
}
DataInputStream in = fs.open(inverseCovarianceFile.get());
try {
inverseCovarianceMatrix.readFields(in);
} finally {
Closeables.close(in, true);
}
this.inverseCovarianceMatrix = inverseCovarianceMatrix.get();
Preconditions.checkArgument(this.inverseCovarianceMatrix != null, "inverseCovarianceMatrix not initialized");
}
if (meanVectorFile.get() != null) {
FileSystem fs = FileSystem.get(meanVectorFile.get().toUri(), jobConf);