Package de.lmu.ifi.dbs.elki.algorithm.clustering.trivial

Examples of de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelHierarchicalClustering.run()


   * @param expected Expected score
   */
  protected <O> void testFMeasureHierarchical(Database database, Clustering<?> clustering, double expected) {
    // Run by-label as reference
    ByLabelHierarchicalClustering bylabel = new ByLabelHierarchicalClustering();
    Clustering<Model> rbl = bylabel.run(database);

    double score = PairCountingFMeasure.compareClusterings(clustering, rbl, 1.0, false, true);
    if(logger.isVerbose()) {
      logger.verbose(this.getClass().getSimpleName() + " score: " + score + " expect: " + expected);
    }
View Full Code Here


    final Database db = ResultUtil.findDatabase(getResult());
    Clustering<Model> c = null;
    try {
      // Try to cluster by labels
      ByLabelHierarchicalClustering split = new ByLabelHierarchicalClustering();
      c = split.run(db);
    }
    catch(NoSupportedDataTypeException e) {
      // Put everything into one
      c = new TrivialAllInOne().run(db);
    }
View Full Code Here

  public static <O> void ensureClusteringResult(final Database db, final Result result) {
    Collection<Clustering<?>> clusterings = ResultUtil.filterResults(result, Clustering.class);
    if(clusterings.size() == 0) {
      try {
        ClusteringAlgorithm<Clustering<Model>> split = new ByLabelHierarchicalClustering();
        Clustering<Model> c = split.run(db);
        addChildResult(db, c);
      }
      catch(NoSupportedDataTypeException e) {
        Clustering<Model> c = (new TrivialAllInOne()).run(db);
        addChildResult(db, c);
View Full Code Here

  public static <O> void ensureClusteringResult(final Database db, final Result result) {
    Collection<Clustering<?>> clusterings = ResultUtil.filterResults(result, Clustering.class);
    if(clusterings.size() == 0) {
      try {
        ClusteringAlgorithm<Clustering<Model>> split = new ByLabelHierarchicalClustering();
        Clustering<Model> c = split.run(db);
        addChildResult(db, c);
      }
      catch(NoSupportedDataTypeException e) {
        Clustering<Model> c = (new TrivialAllInOne()).run(db);
        addChildResult(db, c);
View Full Code Here

   * @return generated clustering
   */
  private Clustering<Model> generateDefaultClustering() {
    // Cluster by labels
    ByLabelHierarchicalClustering split = new ByLabelHierarchicalClustering();
    Clustering<Model> c = split.run(ResultUtil.findDatabase(getResult()));
    // store.
    put(CLUSTERING_FALLBACK, c);
    return c;
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.