org.geworkbench.bison.algorithm.classification
Class CSClassifier

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.geworkbench.bison.datastructure.complex.panels.CSItemList<T>
                  extended by org.geworkbench.bison.datastructure.complex.panels.CSSequentialItemList<T>
                      extended by org.geworkbench.bison.datastructure.biocollections.CSDataSet<T>
                          extended by org.geworkbench.bison.datastructure.biocollections.CSAncillaryDataSet
                              extended by org.geworkbench.bison.algorithm.classification.CSClassifier
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, DSAncillaryDataSet, DSDataSet, DSItemList, DSDescribable, DSExtendable, DSIdentifiable, DSNamed
Direct Known Subclasses:
CSVisualClassifier

public abstract class CSClassifier
extends CSAncillaryDataSet

Implementing classifiers are able to run classifications on objects.

Version:
$Id: CSClassifier.java 8481 2011-11-02 15:43:58Z zji $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.geworkbench.bison.datastructure.biocollections.CSDataSet
columnOrder, compatibilityLabel, dataSetProperties, description, experimentInfo, extend, file, label
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected CSClassifier(DSDataSet<?> parent, java.lang.String label, java.lang.String[] classifications)
           
 
Method Summary
abstract  int classify(float[] data)
          Runs a classification on the given object.
 java.lang.String[] getClassifications()
          The array of class names that this classifier supports.
 
Methods inherited from class org.geworkbench.bison.datastructure.biocollections.CSAncillaryDataSet
getParentDataSet, setParent
 
Methods inherited from class org.geworkbench.bison.datastructure.biocollections.CSDataSet
addNameValuePair, addObject, allowMultipleValues, clearName, forceUniqueValue, getColumnOrder, getCompatibilityLabel, getDataSetName, getDescription, getExperimentInformation, getFile, getID, getLabel, getObject, getValuesForName, isActive, isUniqueValue, setColumnOrder, setDescription, setExperimentInformation, setFile, setID, setLabel, toString, writeToFile
 
Methods inherited from class org.geworkbench.bison.datastructure.complex.panels.CSSequentialItemList
add, add, remove
 
Methods inherited from class org.geworkbench.bison.datastructure.complex.panels.CSItemList
addAll, clear, equals, get, hashCode, set, setLabel
 
Methods inherited from class java.util.ArrayList
addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geworkbench.bison.datastructure.biocollections.DSDataSet
addObject, getColumnOrder, getCompatibilityLabel, getDataSetName, getExperimentInformation, getFile, getObject, isActive, setColumnOrder, setExperimentInformation, setFile, writeToFile
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSDescribable
getDescription, setDescription
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSNamed
getLabel, setLabel
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSExtendable
addNameValuePair, allowMultipleValues, clearName, forceUniqueValue, getValuesForName, isUniqueValue
 
Methods inherited from interface org.geworkbench.bison.datastructure.complex.panels.DSItemList
get
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSIdentifiable
getID, setID
 

Constructor Detail

CSClassifier

protected CSClassifier(DSDataSet<?> parent,
                       java.lang.String label,
                       java.lang.String[] classifications)
Method Detail

classify

public abstract int classify(float[] data)
Runs a classification on the given object.

Parameters:
data - the data to classify.
Returns:
a classification of the given object, which is an index in to the array returned by getClassifications()

getClassifications

public java.lang.String[] getClassifications()
The array of class names that this classifier supports. At least two classes must be present.

Returns: