/** * Convenience method to provide backward compatibility */ public static void run(Configuration conf, Path input, Path output, DistanceMeasure measure, double t1, double t2, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { run(conf, input, output, measure, t1, t2, t1, t2, 0, runClustering, clusterClassificationThreshold, runSequential); }
public static void main(String[] args) throws Exception { ToolRunner.run(new Configuration(), new CanopyDriver(), args); }
int clusterFilter, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { Path clustersOut = buildClusters(conf, input, output, measure, t1, t2, t3, t4, clusterFilter, runSequential); if (runClustering) { clusterData(conf, input, clustersOut, output, clusterClassificationThreshold, runSequential);
input, output, measure, t1, t2); if (runSequential) { return buildClustersSeq(input, output, measure, t1, t2, clusterFilter); } else { return buildClustersMR(conf, input, output, measure, t1, t2, t3, t4, clusterFilter);
addInputOption(); addOutputOption(); addOption(DefaultOptionCreator.distanceMeasureOption().create()); addOption(DefaultOptionCreator.t1Option().create()); addOption(DefaultOptionCreator.t2Option().create()); addOption(DefaultOptionCreator.t3Option().create()); addOption(DefaultOptionCreator.t4Option().create()); addOption(DefaultOptionCreator.clusterFilterOption().create()); addOption(DefaultOptionCreator.overwriteOption().create()); addOption(DefaultOptionCreator.clusteringOption().create()); addOption(DefaultOptionCreator.methodOption().create()); addOption(DefaultOptionCreator.outlierThresholdOption().create()); if (parseArguments(args) == null) { return -1; Path input = getInputPath(); Path output = getOutputPath(); Configuration conf = getConf(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION)) { HadoopUtil.delete(conf, output); String measureClass = getOption(DefaultOptionCreator.DISTANCE_MEASURE_OPTION); double t1 = Double.parseDouble(getOption(DefaultOptionCreator.T1_OPTION)); double t2 = Double.parseDouble(getOption(DefaultOptionCreator.T2_OPTION)); double t3 = t1; if (hasOption(DefaultOptionCreator.T3_OPTION)) { t3 = Double.parseDouble(getOption(DefaultOptionCreator.T3_OPTION));
/** * Convenience method for backwards compatibility * */ public static Path buildClusters(Configuration conf, Path input, Path output, DistanceMeasure measure, double t1, double t2, int clusterFilter, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { return buildClusters(conf, input, output, measure, t1, t2, t1, t2, clusterFilter, runSequential); }
addInputOption(); addOutputOption(); addOption(DefaultOptionCreator.distanceMeasureOption().create()); addOption(DefaultOptionCreator.t1Option().create()); addOption(DefaultOptionCreator.t2Option().create()); addOption(DefaultOptionCreator.t3Option().create()); addOption(DefaultOptionCreator.t4Option().create()); addOption(DefaultOptionCreator.clusterFilterOption().create()); addOption(DefaultOptionCreator.overwriteOption().create()); addOption(DefaultOptionCreator.clusteringOption().create()); addOption(DefaultOptionCreator.methodOption().create()); addOption(DefaultOptionCreator.outlierThresholdOption().create()); if (parseArguments(args) == null) { return -1; Path input = getInputPath(); Path output = getOutputPath(); Configuration conf = getConf(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION)) { HadoopUtil.delete(conf, output); String measureClass = getOption(DefaultOptionCreator.DISTANCE_MEASURE_OPTION); double t1 = Double.parseDouble(getOption(DefaultOptionCreator.T1_OPTION)); double t2 = Double.parseDouble(getOption(DefaultOptionCreator.T2_OPTION)); double t3 = t1; if (hasOption(DefaultOptionCreator.T3_OPTION)) { t3 = Double.parseDouble(getOption(DefaultOptionCreator.T3_OPTION));
input, output, measure, t1, t2); if (runSequential) { return buildClustersSeq(input, output, measure, t1, t2, clusterFilter); } else { return buildClustersMR(conf, input, output, measure, t1, t2, t3, t4, clusterFilter);
/** * Convenience method for backwards compatibility * */ public static Path buildClusters(Configuration conf, Path input, Path output, DistanceMeasure measure, double t1, double t2, int clusterFilter, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { return buildClusters(conf, input, output, measure, t1, t2, t1, t2, clusterFilter, runSequential); }
addInputOption(); addOutputOption(); addOption(DefaultOptionCreator.distanceMeasureOption().create()); addOption(DefaultOptionCreator.t1Option().create()); addOption(DefaultOptionCreator.t2Option().create()); addOption(DefaultOptionCreator.t3Option().create()); addOption(DefaultOptionCreator.t4Option().create()); addOption(DefaultOptionCreator.clusterFilterOption().create()); addOption(DefaultOptionCreator.overwriteOption().create()); addOption(DefaultOptionCreator.clusteringOption().create()); addOption(DefaultOptionCreator.methodOption().create()); addOption(DefaultOptionCreator.outlierThresholdOption().create()); if (parseArguments(args) == null) { return -1; Path input = getInputPath(); Path output = getOutputPath(); Configuration conf = getConf(); if (hasOption(DefaultOptionCreator.OVERWRITE_OPTION)) { HadoopUtil.delete(conf, output); String measureClass = getOption(DefaultOptionCreator.DISTANCE_MEASURE_OPTION); double t1 = Double.parseDouble(getOption(DefaultOptionCreator.T1_OPTION)); double t2 = Double.parseDouble(getOption(DefaultOptionCreator.T2_OPTION)); double t3 = t1; if (hasOption(DefaultOptionCreator.T3_OPTION)) { t3 = Double.parseDouble(getOption(DefaultOptionCreator.T3_OPTION));
/** * Convenience method to provide backward compatibility */ public static void run(Configuration conf, Path input, Path output, DistanceMeasure measure, double t1, double t2, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { run(conf, input, output, measure, t1, t2, t1, t2, 0, runClustering, clusterClassificationThreshold, runSequential); }
public static void main(String[] args) throws Exception { ToolRunner.run(new Configuration(), new CanopyDriver(), args); }
int clusterFilter, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { Path clustersOut = buildClusters(conf, input, output, measure, t1, t2, t3, t4, clusterFilter, runSequential); if (runClustering) { clusterData(conf, input, clustersOut, output, clusterClassificationThreshold, runSequential);
input, output, measure, t1, t2); if (runSequential) { return buildClustersSeq(input, output, measure, t1, t2, clusterFilter); } else { return buildClustersMR(conf, input, output, measure, t1, t2, t3, t4, clusterFilter);
/** * Convenience method for backwards compatibility * */ public static Path buildClusters(Configuration conf, Path input, Path output, DistanceMeasure measure, double t1, double t2, int clusterFilter, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { return buildClusters(conf, input, output, measure, t1, t2, t1, t2, clusterFilter, runSequential); }
/** * Convenience method to provide backward compatibility */ public static void run(Configuration conf, Path input, Path output, DistanceMeasure measure, double t1, double t2, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { run(conf, input, output, measure, t1, t2, t1, t2, 0, runClustering, clusterClassificationThreshold, runSequential); }
public static void main(String[] args) throws Exception { ToolRunner.run(new Configuration(), new CanopyDriver(), args); }
int clusterFilter, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { Path clustersOut = buildClusters(conf, input, output, measure, t1, t2, t3, t4, clusterFilter, runSequential); if (runClustering) { clusterData(conf, input, clustersOut, output, clusterClassificationThreshold, runSequential);
/** * Convenience method creates new Configuration() Build a directory of Canopy * clusters from the input arguments and, if requested, cluster the input * vectors using these clusters * * @param input * the Path to the directory containing input vectors * @param output * the Path for all output directories * @param t1 * the double T1 distance metric * @param t2 * the double T2 distance metric * @param runClustering * cluster the input vectors if true * @param clusterClassificationThreshold * vectors having pdf below this value will not be clustered. Its value should be between 0 and 1. * @param runSequential * execute sequentially if true */ public static void run(Path input, Path output, DistanceMeasure measure, double t1, double t2, boolean runClustering, double clusterClassificationThreshold, boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { run(new Configuration(), input, output, measure, t1, t2, runClustering, clusterClassificationThreshold, runSequential); }
optKey(DefaultOptionCreator.METHOD_OPTION), DefaultOptionCreator.SEQUENTIAL_METHOD }; ToolRunner.run(config, new CanopyDriver(), args);