Package org.apache.mahout.common.distance

Examples of org.apache.mahout.common.distance.UserDefinedDistanceMeasure


    ClusteringTestUtils.writePointsToFile(points, getTestTempFilePath("testdata/file1"), fs, conf);
    ClusteringTestUtils.writePointsToFile(points, getTestTempFilePath("testdata/file2"), fs, conf);
    // now run the Canopy Driver. User defined measure happens to be a Manhattan
    // subclass so results are same.
    Path output = getTestTempDirPath("output");
    CanopyDriver.run(conf, getTestTempDirPath("testdata"), output, new UserDefinedDistanceMeasure(), 3.1, 2.1, false, false);

    // verify output from sequence file
    Configuration job = new Configuration();
    Path path = new Path(output, "clusters-0/part-r-00000");
    FileSystem fs = FileSystem.get(path.toUri(), job);
View Full Code Here


        getTestTempFilePath("testdata/file2"), fs, conf);
    // now run the Canopy Driver. User defined measure happens to be a Manhattan
    // subclass so results are same.
    Path output = getTestTempDirPath("output");
    CanopyDriver.run(conf, getTestTempDirPath("testdata"), output,
        new UserDefinedDistanceMeasure(), 3.1, 2.1, false, false);

    // verify output from sequence file
    Configuration job = new Configuration();
    Path path = new Path(output, "clusters-0/part-r-00000");
    FileSystem fs = FileSystem.get(path.toUri(), job);
View Full Code Here

TOP

Related Classes of org.apache.mahout.common.distance.UserDefinedDistanceMeasure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.