
@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 String |
COMMENT
The comment character.
|
private File |
file
The file to be reparsed.
|
private static Logging |
LOG
The logger for this class.
|
| Constructor and Description |
|---|
ExternalClustering(File file)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
attachToRelation(Database database,
Relation<?> r,
TIntArrayList assignment,
ArrayList<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.
|
makeParameterDistanceFunctionprivate static final Logging LOG
public static final String COMMENT
private File file
public ExternalClustering(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, TIntArrayList assignment, ArrayList<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 © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.