@Description(value="Load clustering results from an external file. Each line is expected to consists of one clustering, one integer per point and an (optional) non-numeric label.") public class ExternalClustering extends AbstractAlgorithm<Clustering<? extends Model>> implements ClusteringAlgorithm<Clustering<? extends Model>>
ClusteringVectorDumper.
The input format of this parser is text-based:
# Optional comment 1 1 1 2 2 2 -1 Example labelWhere non-negative numbers are cluster assignments, negative numbers are considered noise clusters.
| Modifier and Type | Class and Description |
|---|---|
static class |
ExternalClustering.Parameterizer
Parameterization class
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMENT
The comment character.
|
private java.io.File |
file
The file to be reparsed.
|
private static Logging |
LOG
The logger for this class.
|
ALGORITHM_ID| Constructor and Description |
|---|
ExternalClustering(java.io.File file)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
attachToRelation(Database database,
Relation<?> r,
it.unimi.dsi.fastutil.ints.IntArrayList assignment,
java.util.ArrayList<java.lang.String> name)
Build a clustering from the file result.
|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
Clustering<? extends Model> |
run(Database database)
Run the algorithm.
|
private static final Logging LOG
public static final java.lang.String COMMENT
private java.io.File file
public ExternalClustering(java.io.File file)
file - File to loadpublic Clustering<? extends Model> run(Database database)
run in interface Algorithmrun in interface ClusteringAlgorithm<Clustering<? extends Model>>run in class AbstractAlgorithm<Clustering<? extends Model>>database - Database to useprivate void attachToRelation(Database database, Relation<?> r, it.unimi.dsi.fastutil.ints.IntArrayList assignment, java.util.ArrayList<java.lang.String> name)
database - Databaser - Result to attach toassignment - Cluster assignmentname - Nameprotected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<Clustering<? extends Model>>public TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<Clustering<? extends Model>>Copyright © 2019 ELKI Development Team. License information.