Package org.biojava.stats.svm
Class AbstractSVMClassifierModel
- java.lang.Object
-
- org.biojava.stats.svm.AbstractSVMClassifierModel
-
- All Implemented Interfaces:
SVMClassifierModel
- Direct Known Subclasses:
SimpleSVMClassifierModel
public abstract class AbstractSVMClassifierModel extends Object implements SVMClassifierModel
Abstract implementation of SVMClassifierModel.
To implement a read-only implementation, you need only implement getThreshold and getAlpha.
- Author:
- Matthew Pocock
-
-
Constructor Summary
Constructors Constructor Description AbstractSVMClassifierModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItem(Object item)voidaddItemAlpha(Object item, double alpha)doubleclassify(Object item)voidclear()voidremoveItem(Object item)voidsetAlpha(Object item, double alpha)voidsetThreshold()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.biojava.stats.svm.SVMClassifierModel
getAlpha, getKernel, getThreshold, itemAlphas, items, setThreshold
-
-
-
-
Constructor Detail
-
AbstractSVMClassifierModel
public AbstractSVMClassifierModel()
-
-
Method Detail
-
setThreshold
public void setThreshold() throws UnsupportedOperationException
- Throws:
UnsupportedOperationException
-
setAlpha
public void setAlpha(Object item, double alpha) throws UnsupportedOperationException
- Specified by:
setAlphain interfaceSVMClassifierModel- Throws:
UnsupportedOperationException
-
addItem
public void addItem(Object item) throws UnsupportedOperationException
- Specified by:
addItemin interfaceSVMClassifierModel- Throws:
UnsupportedOperationException
-
addItemAlpha
public void addItemAlpha(Object item, double alpha) throws UnsupportedOperationException
- Specified by:
addItemAlphain interfaceSVMClassifierModel- Throws:
UnsupportedOperationException
-
removeItem
public void removeItem(Object item) throws UnsupportedOperationException
- Specified by:
removeItemin interfaceSVMClassifierModel- Throws:
UnsupportedOperationException
-
clear
public void clear() throws UnsupportedOperationException
- Specified by:
clearin interfaceSVMClassifierModel- Throws:
UnsupportedOperationException
-
classify
public double classify(Object item)
- Specified by:
classifyin interfaceSVMClassifierModel
-
-