/** * Load multiple upper triangular matrices and sum them up. * * @return the sum of upper triangular inputs. */ public static DenseSymmetricMatrix loadAndSumUpperTriangularMatricesAsSymmetric(Path glob, Configuration conf) throws IOException { Vector v = loadAndSumUpVectors(glob, conf); return v == null ? null : new DenseSymmetricMatrix(v); }
/** * Load multiple upper triangular matrices and sum them up. * * @return the sum of upper triangular inputs. */ public static DenseSymmetricMatrix loadAndSumUpperTriangularMatricesAsSymmetric(Path glob, Configuration conf) throws IOException { Vector v = loadAndSumUpVectors(glob, conf); return v == null ? null : new DenseSymmetricMatrix(v); }
/** * Load multiple upper triangular matrices and sum them up. * * @return the sum of upper triangular inputs. */ public static DenseSymmetricMatrix loadAndSumUpperTriangularMatricesAsSymmetric(Path glob, Configuration conf) throws IOException { Vector v = loadAndSumUpVectors(glob, conf); return v == null ? null : new DenseSymmetricMatrix(v); }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); blockHeight = conf.getInt(BtJob.PROP_OUTER_PROD_BLOCK_HEIGHT, -1); String sbPathStr = conf.get(PROP_SB_PATH); /* * PCA -related corrections (MAHOUT-817) */ if (sbPathStr != null) { sb = SSVDHelper.loadAndSumUpVectors(new Path(sbPathStr), conf); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); blockHeight = conf.getInt(BtJob.PROP_OUTER_PROD_BLOCK_HEIGHT, -1); String sbPathStr = conf.get(PROP_SB_PATH); /* * PCA -related corrections (MAHOUT-817) */ if (sbPathStr != null) { sb = SSVDHelper.loadAndSumUpVectors(new Path(sbPathStr), conf); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); blockHeight = conf.getInt(BtJob.PROP_OUTER_PROD_BLOCK_HEIGHT, -1); String sbPathStr = conf.get(PROP_SB_PATH); /* * PCA -related corrections (MAHOUT-817) */ if (sbPathStr != null) { sb = SSVDHelper.loadAndSumUpVectors(new Path(sbPathStr), conf); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); int k = Integer.parseInt(conf.get(QRFirstStep.PROP_K)); int p = Integer.parseInt(conf.get(QRFirstStep.PROP_P)); kp = k + p; outKey = new SplitPartitionedWritable(context); blockHeight = conf.getInt(BtJob.PROP_OUTER_PROD_BLOCK_HEIGHT, -1); distributedBt = conf.get(PROP_BT_BROADCAST) != null; if (distributedBt) { btLocalPath = HadoopUtil.getCachedFiles(conf); localFsConfig = new Configuration(); localFsConfig.set("fs.default.name", "file:///"); } /* * PCA -related corrections (MAHOUT-817) */ String xiPathStr = conf.get(PROP_XI_PATH); if (xiPathStr != null) { xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); sq = SSVDHelper.loadAndSumUpVectors(new Path(conf.get(PROP_SQ_PATH)), conf); } } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); int k = Integer.parseInt(conf.get(QRFirstStep.PROP_K)); int p = Integer.parseInt(conf.get(QRFirstStep.PROP_P)); kp = k + p; outKey = new SplitPartitionedWritable(context); blockHeight = conf.getInt(BtJob.PROP_OUTER_PROD_BLOCK_HEIGHT, -1); distributedBt = conf.get(PROP_BT_BROADCAST) != null; if (distributedBt) { btLocalPath = HadoopUtil.getCachedFiles(conf); localFsConfig = new Configuration(); localFsConfig.set("fs.default.name", "file:///"); } /* * PCA -related corrections (MAHOUT-817) */ String xiPathStr = conf.get(PROP_XI_PATH); if (xiPathStr != null) { xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); sq = SSVDHelper.loadAndSumUpVectors(new Path(conf.get(PROP_SQ_PATH)), conf); } } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); int k = Integer.parseInt(conf.get(QRFirstStep.PROP_K)); int p = Integer.parseInt(conf.get(QRFirstStep.PROP_P)); kp = k + p; outKey = new SplitPartitionedWritable(context); blockHeight = conf.getInt(BtJob.PROP_OUTER_PROD_BLOCK_HEIGHT, -1); distributedBt = conf.get(PROP_BT_BROADCAST) != null; if (distributedBt) { btLocalPath = HadoopUtil.getCachedFiles(conf); localFsConfig = new Configuration(); localFsConfig.set("fs.default.name", "file:///"); } /* * PCA -related corrections (MAHOUT-817) */ String xiPathStr = conf.get(PROP_XI_PATH); if (xiPathStr != null) { xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); sq = SSVDHelper.loadAndSumUpVectors(new Path(conf.get(PROP_SQ_PATH)), conf); } } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); blockHeight = conf.getInt(PROP_OUTER_PROD_BLOCK_HEIGHT, -1); outputBBt = conf.getBoolean(PROP_OUPTUT_BBT_PRODUCTS, false); if (outputBBt) { int k = conf.getInt(QJob.PROP_K, -1); int p = conf.getInt(QJob.PROP_P, -1); Validate.isTrue(k > 0, "invalid k parameter"); Validate.isTrue(p >= 0, "invalid p parameter"); mBBt = new UpperTriangular(k + p); } String xiPathStr = conf.get(PROP_XI_PATH); if (xiPathStr != null) { xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); if (xi == null) { throw new IOException(String.format("unable to load mean path xi from %s.", xiPathStr)); } } if (outputBBt || xi != null) { outputs = new MultipleOutputs(new JobConf(conf)); closeables.addFirst(new IOUtils.MultipleOutputsCloseableAdapter(outputs)); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); blockHeight = conf.getInt(PROP_OUTER_PROD_BLOCK_HEIGHT, -1); outputBBt = conf.getBoolean(PROP_OUPTUT_BBT_PRODUCTS, false); if (outputBBt) { int k = conf.getInt(QJob.PROP_K, -1); int p = conf.getInt(QJob.PROP_P, -1); Validate.isTrue(k > 0, "invalid k parameter"); Validate.isTrue(p >= 0, "invalid p parameter"); mBBt = new UpperTriangular(k + p); } String xiPathStr = conf.get(PROP_XI_PATH); if (xiPathStr != null) { xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); if (xi == null) { throw new IOException(String.format("unable to load mean path xi from %s.", xiPathStr)); } } if (outputBBt || xi != null) { outputs = new MultipleOutputs(new JobConf(conf)); closeables.addFirst(new IOUtils.MultipleOutputsCloseableAdapter(outputs)); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); blockHeight = conf.getInt(PROP_OUTER_PROD_BLOCK_HEIGHT, -1); outputBBt = conf.getBoolean(PROP_OUPTUT_BBT_PRODUCTS, false); if (outputBBt) { int k = conf.getInt(QJob.PROP_K, -1); int p = conf.getInt(QJob.PROP_P, -1); Validate.isTrue(k > 0, "invalid k parameter"); Validate.isTrue(p >= 0, "invalid p parameter"); mBBt = new UpperTriangular(k + p); } String xiPathStr = conf.get(PROP_XI_PATH); if (xiPathStr != null) { xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); if (xi == null) { throw new IOException(String.format("unable to load mean path xi from %s.", xiPathStr)); } } if (outputBBt || xi != null) { outputs = new MultipleOutputs(new JobConf(conf)); closeables.addFirst(new IOUtils.MultipleOutputsCloseableAdapter(outputs)); } }
sb = SSVDHelper.loadAndSumUpVectors(new Path(sbPathStr), conf); if (sb == null) throw new IOException(String.format("Unable to load s_omega from path %s.", sbPathStr));
sb = SSVDHelper.loadAndSumUpVectors(new Path(sbPathStr), conf); if (sb == null) throw new IOException(String.format("Unable to load s_omega from path %s.", sbPathStr));
sb = SSVDHelper.loadAndSumUpVectors(new Path(sbPathStr), conf); if (sb == null) throw new IOException(String.format("Unable to load s_omega from path %s.", sbPathStr));
xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); sq = SSVDHelper.loadAndSumUpVectors(new Path(conf.get(PROP_SQ_PATH)), conf);
xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); sq = SSVDHelper.loadAndSumUpVectors(new Path(conf.get(PROP_SQ_PATH)), conf);
xi = SSVDHelper.loadAndSumUpVectors(new Path(xiPathStr), conf); sq = SSVDHelper.loadAndSumUpVectors(new Path(conf.get(PROP_SQ_PATH)), conf);
Vector xi = SSVDHelper.loadAndSumUpVectors(pcaMeanPath, conf); if (xi == null) { throw new IOException(String.format("unable to load mean path xi from %s.", Vector sq = SSVDHelper.loadAndSumUpVectors(sqPath, conf); Vector sb = SSVDHelper.loadAndSumUpVectors(sbPath, conf); Matrix mC = sq.cross(sb);
Vector xi = SSVDHelper.loadAndSumUpVectors(pcaMeanPath, conf); if (xi == null) { throw new IOException(String.format("unable to load mean path xi from %s.", Vector sq = SSVDHelper.loadAndSumUpVectors(sqPath, conf); Vector sb = SSVDHelper.loadAndSumUpVectors(sbPath, conf); Matrix mC = sq.cross(sb);