gr.demokritos.iit.jinsect.classification
Class SVMDecider

java.lang.Object
  extended by gr.demokritos.iit.jinsect.classification.Decider
      extended by gr.demokritos.iit.jinsect.classification.SVMDecider
Direct Known Subclasses:
SVMDocDecider

public class SVMDecider
extends Decider

This class describes objects that use Support Vector Machine (SVM) mechanics, in order to classify texts to given categories. The class uses LibSVM implementation of SVMs (see LibSVM for more).


Field Summary
 
Fields inherited from class gr.demokritos.iit.jinsect.classification.Decider
Repository
 
Constructor Summary
SVMDecider(INSECTDB dbRepository)
          Creates a new instance of SVMDecider, given an INSECTDB repository of data.
 
Method Summary
 void addEvidence(Decision dPrv, java.lang.String sFinalCategory)
          Updates the evidence of the determiner with new data, with respect to a previous decision.
protected  svm_node[] documentToNodeArray(SimpleTextDocument dDoc)
          Provides an svm_node array structure, derived from a text document, in order to use the LibSVM functions.
 void reset()
          Resets categories and all other data of the Decider.
protected  Decision suggestCategory(SimpleTextDocument dDoc)
          Suggests a category for a given document.
 
Methods inherited from class gr.demokritos.iit.jinsect.classification.Decider
addEvidence, filterDataString, getAvailableCategories, setRepository, suggestCategory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVMDecider

public SVMDecider(INSECTDB dbRepository)
Creates a new instance of SVMDecider, given an INSECTDB repository of data.

Method Detail

suggestCategory

protected Decision suggestCategory(SimpleTextDocument dDoc)
Suggests a category for a given document.

Overrides:
suggestCategory in class Decider
Parameters:
dDoc - The document to classify.
Returns:
A Decision upon the classification of the given document.

addEvidence

public void addEvidence(Decision dPrv,
                        java.lang.String sFinalCategory)
Description copied from class: Decider
Updates the evidence of the determiner with new data, with respect to a previous decision.

Overrides:
addEvidence in class Decider
Parameters:
dPrv - The previous decision info.
sFinalCategory - The correct category for the selected document.

documentToNodeArray

protected svm_node[] documentToNodeArray(SimpleTextDocument dDoc)
Provides an svm_node array structure, derived from a text document, in order to use the LibSVM functions.

Parameters:
dDoc - The text document to represent.
Returns:
An svm_node array structure representing the given document.

reset

public void reset()
Description copied from class: Decider
Resets categories and all other data of the Decider.

Overrides:
reset in class Decider