|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.logging.AbstractLoggable de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult<O> de.lmu.ifi.dbs.elki.algorithm.result.PartitionResults<O> de.lmu.ifi.dbs.elki.algorithm.result.clustering.PartitionClusteringResults<O>
O
- the type of DatabaseObjects handled by this Resultpublic class PartitionClusteringResults<O extends DatabaseObject>
A result for a partitioning clustering algorithm providing a single result for a single partition.
Field Summary | |
---|---|
private Integer |
noise
A partitionID that contains per definition noise - may remain null. |
private Map<Integer,ClusteringResult<O>> |
partitionResults
Holds the results for the partitions. |
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.result.PartitionResults |
---|
PARTITION_LABEL_PREFIX, PARTITION_MARKER |
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult |
---|
db, FILE_EXTENSION |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Fields inherited from interface de.lmu.ifi.dbs.elki.algorithm.result.Result |
---|
SEPARATOR |
Constructor Summary | |
---|---|
PartitionClusteringResults(Database<O> db,
Map<Integer,ClusteringResult<O>> resultMap,
Integer noise)
A result for a partitioning algorithm providing a single result for a single partition. |
Method Summary | ||
---|---|---|
|
appendModel(L clusterID,
Result<O> model)
Appends a model the designated cluster. |
|
|
associate(Class<L> classLabel)
Returns a database containing only non-noise objects. |
|
|
clustering(Class<L> classLabel)
Returns a mapping to databases containing only non-noise objects. |
|
Cluster[] |
getClusters()
Returns the clusters as array of arrays of object ids. |
|
Integer |
getNoiseID()
Returns the id of the noise partition. |
|
ClusteringResult<O> |
getResult(Integer partitionID)
Returns the result of the specified partition. |
|
Database<O> |
noise()
Returns a database containing only noise objects. |
|
void |
output(File out,
Normalization<O> normalization,
List<AttributeSettings> settings)
Writes the clustering result to the given file. |
|
void |
output(PrintStream outStream,
Normalization<O> normalization,
List<AttributeSettings> settings)
Writes the clustering result to the given stream. |
|
Iterator<Integer> |
partitionsIterator()
Returns an iterator over the partition IDs. |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.result.AbstractResult |
---|
getDatabase, writeHeader |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Map<Integer,ClusteringResult<O extends DatabaseObject>> partitionResults
private Integer noise
Constructor Detail |
---|
public PartitionClusteringResults(Database<O> db, Map<Integer,ClusteringResult<O>> resultMap, Integer noise)
db
- the databaseresultMap
- a map of partition IDs to resultsnoise
- a partitionID that contains per definition noise - may
remain nullMethod Detail |
---|
public Cluster[] getClusters()
ClusteringResult
getClusters
in interface ClusteringResult<O extends DatabaseObject>
public void output(File out, Normalization<O> normalization, List<AttributeSettings> settings) throws UnableToComplyException
Result
output
in interface Result<O extends DatabaseObject>
output
in class PartitionResults<O extends DatabaseObject>
out
- file, which designates the location to write the results,
or which's name designates the prefix of any locations to write the results,
or which could remain null to designate the standard-out as location for output.normalization
- Normalization to restore original values according to, if this action is supported
- may remain null.settings
- the settings to be written into the header, if this parameter is null
,
no header will be written
UnableToComplyException
- if any feature vector is not compatible with values initialized during normalizationResult.output(File,Normalization,List)
public void output(PrintStream outStream, Normalization<O> normalization, List<AttributeSettings> settings) throws UnableToComplyException
Result
output
in interface Result<O extends DatabaseObject>
output
in class PartitionResults<O extends DatabaseObject>
outStream
- the stream to write tonormalization
- Normalization to restore original values according to, if this action is supported
- may remain null.settings
- the settings to be written into the header, if this parameter is null
,
no header will be written
UnableToComplyException
- if any feature vector is not compatible with values initialized during normalizationPartitionResults.output(java.io.PrintStream,
de.lmu.ifi.dbs.elki.normalization.Normalization,java.util.List)
public Iterator<Integer> partitionsIterator()
public ClusteringResult<O> getResult(Integer partitionID)
partitionID
- the ID of the partition
public <L extends ClassLabel<L>> Database<O> associate(Class<L> classLabel)
associate
in interface ClusteringResult<O extends DatabaseObject>
classLabel
- the most convenient ClassLabel
is
the HierarchicalClassLabel
, that
would have as top-level label the partition id.
ClusteringResult.associate(Class)
public Database<O> noise()
ClusteringResult
noise
in interface ClusteringResult<O extends DatabaseObject>
ClusteringResult.noise()
public <L extends ClassLabel<L>> Map<L,Database<O>> clustering(Class<L> classLabel)
clustering
in interface ClusteringResult<O extends DatabaseObject>
classLabel
- the most convenient ClassLabel
is
the HierarchicalClassLabel
, that
would have as top-level label the partition id.
ClusteringResult.clustering(Class)
public <L extends ClassLabel<L>> void appendModel(L clusterID, Result<O> model)
ClusteringResult
appendModel
in interface ClusteringResult<O extends DatabaseObject>
clusterID
- ClassLabel assigned to the cluster a model should be appended tomodel
- the model describing the designated clusterpublic Integer getNoiseID()
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |