com.rapidminer.operator.clustering
Class CentroidClusterModel

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.operator.clustering.ClusterModel
              extended by 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

Field Summary
 
Fields inherited from class com.rapidminer.operator.clustering.ClusterModel
UNASSIGNABLE
 
Constructor Summary
CentroidClusterModel(int k, Attributes attributes)
           
CentroidClusterModel(int k, java.util.Collection<java.lang.String> dimensionNames, DistanceMeasure distanceMeasure)
           
 
Method Summary
 void assignExample(int i, double[] asDoubleArray)
           
 void checkCapabilities(ExampleSet exampleSet)
           
 boolean finishAssign()
           
 java.lang.String[] getAttributeNames()
           
 Centroid getCentroid(int i)
           
 double[] getCentroidCoordinates(int i)
           
 int[] getClusterAssignments(ExampleSet exampleSet)
          This method returns an array with the indices or the cluster for all examples in the set.
 java.lang.String getExtension()
          Returns the default extension in file choosers.
 java.lang.String getFileDescription()
          Returns the file description used in file choosers.
 
Methods inherited from class com.rapidminer.operator.clustering.ClusterModel
getCluster, getClusterIndexOfId, getClusters, getName, getNumberOfClusters, setClusterAssignments, toString
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getResultIcon, getVisualizationComponent, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.IOObject
copy, getLog, getSource, setLoggingHandler, setSource, write
 

Constructor Detail

CentroidClusterModel

public CentroidClusterModel(int k,
                            java.util.Collection<java.lang.String> dimensionNames,
                            DistanceMeasure distanceMeasure)

CentroidClusterModel

public CentroidClusterModel(int k,
                            Attributes attributes)
Method Detail

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