com.rapidminer.operator.clustering
Class CentroidClusterModel
java.lang.Object
com.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.operator.clustering.ClusterModel
com.rapidminer.operator.clustering.CentroidClusterModel
- All Implemented Interfaces:
- IOObject, ResultObject, Saveable, LoggingHandler, java.io.Serializable
public class CentroidClusterModel
- extends ClusterModel
This is the superclass for all centroid based cluster models and supports assigning unseen
examples to the nearest centroid.
- 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 |
CentroidClusterModel
public CentroidClusterModel(int k,
java.util.Collection<java.lang.String> dimensionNames,
DistanceMeasure distanceMeasure)
CentroidClusterModel
public CentroidClusterModel(int k,
Attributes attributes)
getClusterAssignments
public int[] getClusterAssignments(ExampleSet exampleSet)
- Description copied from class:
ClusterModel
- 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.
- Overrides:
getClusterAssignments in class ClusterModel
checkCapabilities
public void checkCapabilities(ExampleSet exampleSet)
throws OperatorException
- Overrides:
checkCapabilities in class ClusterModel
- Throws:
OperatorException
getAttributeNames
public java.lang.String[] getAttributeNames()
getCentroidCoordinates
public double[] getCentroidCoordinates(int i)
getCentroid
public Centroid getCentroid(int i)
assignExample
public void assignExample(int i,
double[] asDoubleArray)
finishAssign
public boolean finishAssign()
getExtension
public java.lang.String getExtension()
- Description copied from interface:
Saveable
- Returns the default extension in file choosers.
- Specified by:
getExtension in interface Saveable- Overrides:
getExtension in class ClusterModel
getFileDescription
public java.lang.String getFileDescription()
- Description copied from interface:
Saveable
- Returns the file description used in file choosers.
- Specified by:
getFileDescription in interface Saveable- Overrides:
getFileDescription in class ClusterModel
Copyright © 2001-2009 by Rapid-I