com.rapidminer.operator.clustering
Class ClusterModel
java.lang.Object
com.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.operator.clustering.ClusterModel
- All Implemented Interfaces:
- IOObject, ResultObject, Saveable, LoggingHandler, java.io.Serializable
- Direct Known Subclasses:
- CentroidClusterModel, FlatFuzzyClusterModel
public class ClusterModel
- extends ResultObjectAdapter
This class is the standard flat cluster model, using the example ids to remember which examples
were assigned to which cluster. This information is stored within the single clusters. Since this,
the id attribute needs to be unchanged when cluster model is applied onto an example set.
- Author:
- Sebastian Land
- See Also:
- Serialized Form
| Methods inherited from class com.rapidminer.operator.ResultObjectAdapter |
addAction, getActions, getResultIcon, getVisualizationComponent, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UNASSIGNABLE
public static final int UNASSIGNABLE
- See Also:
- Constant Field Values
ClusterModel
public ClusterModel(int k)
getNumberOfClusters
public int getNumberOfClusters()
setClusterAssignments
public void setClusterAssignments(int[] clusterId,
ExampleSet exampleSet)
getClusterAssignments
public int[] getClusterAssignments(ExampleSet exampleSet)
- This method returns an array with the indices or the cluster for all examples in the set.
This will work with new examples, if centroid based clustering has been used before.
Otherwise new examples cannot be assigned.
getClusterIndexOfId
public int getClusterIndexOfId(java.lang.Object id)
- This method returns the index of the cluster, this Id's example has been assigned to.
Please note, that this can only be applied to examples included in the clustering process.
New examples might be assigned to clusters using the getClusterAssignments method, if and only
if the cluster model supports this. Currently only centroid based cluster models do.
getCluster
public Cluster getCluster(int i)
getClusters
public java.util.Collection<Cluster> getClusters()
getExtension
public java.lang.String getExtension()
- Description copied from interface:
Saveable
- Returns the default extension in file choosers.
getFileDescription
public java.lang.String getFileDescription()
- Description copied from interface:
Saveable
- Returns the file description used in file choosers.
checkCapabilities
public void checkCapabilities(ExampleSet exampleSet)
throws OperatorException
- Throws:
OperatorException
getName
public java.lang.String getName()
- Description copied from class:
ResultObjectAdapter
- The default implementation returns the classname without package.
- Specified by:
getName in interface ResultObject- Overrides:
getName in class ResultObjectAdapter
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2001-2009 by Rapid-I