Search in sources :

Example 1 with ByLabelHierarchicalClustering

use of de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelHierarchicalClustering in project elki by elki-project.

the class VisualizerContext method generateDefaultClustering.

/**
 * Generate a default (fallback) clustering.
 *
 * @return generated clustering
 */
private Clustering<Model> generateDefaultClustering() {
    final Database db = ResultUtil.findDatabase(hier);
    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);
    }
    return c;
}
Also used : NoSupportedDataTypeException(de.lmu.ifi.dbs.elki.data.type.NoSupportedDataTypeException) Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) TrivialAllInOne(de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.TrivialAllInOne) ByLabelHierarchicalClustering(de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelHierarchicalClustering)

Aggregations

ByLabelHierarchicalClustering (de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelHierarchicalClustering)1 TrivialAllInOne (de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.TrivialAllInOne)1 Model (de.lmu.ifi.dbs.elki.data.model.Model)1 NoSupportedDataTypeException (de.lmu.ifi.dbs.elki.data.type.NoSupportedDataTypeException)1 Database (de.lmu.ifi.dbs.elki.database.Database)1