|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.test.test16.SpamFilterApp
public class SpamFilterApp
Spam filter application.
It is configured through the set() methods.
The cycle method() runs the application and stores the evaluation results in the evaluation report object.
After running all cycles, some statistics may be read using the get() methods.
The corpus used by this application must be a zip file with several textual files (one per email).
The filename must start by ham or spam depending on the class.
Constructor Summary | |
---|---|
SpamFilterApp(java.lang.String corpusZipFile)
Creates a spam filter application that uses the corpus indicated by the parameter. |
Method Summary | |
---|---|
void |
configure()
Configures the application: case base, connectors, etc. |
void |
cycle(CBRQuery query)
Executes a CBR cycle with the given query. |
double |
getFalseNegatives()
Returns the false negatives. |
double |
getFalsePositives()
Returns the false positives. |
KNNClassificationConfig |
getKNNConfig()
Returns the KNN configuration |
double |
getTrueNegatives()
Returns the true negatives |
double |
getTruePositives()
Returns the true positives |
void |
postCycle()
Runs the code to shutdown the application. |
CBRCaseBase |
preCycle()
Runs the precyle where typically cases are read and organized into a case base. |
void |
setClasifMethod(KNNClassificationMethod clasifMethod)
Sets the classification method. |
void |
setK(int k)
Sets the k |
void |
setSimilFunc(LocalSimilarityFunction similFunc)
Sets the similarity function |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpamFilterApp(java.lang.String corpusZipFile)
Method Detail |
---|
public void configure() throws ExecutionException
StandardCBRApplication
configure
in interface StandardCBRApplication
ExecutionException
public CBRCaseBase preCycle() throws ExecutionException
StandardCBRApplication
preCycle
in interface StandardCBRApplication
ExecutionException
public void cycle(CBRQuery query) throws ExecutionException
StandardCBRApplication
cycle
in interface StandardCBRApplication
ExecutionException
public void postCycle() throws ExecutionException
StandardCBRApplication
postCycle
in interface StandardCBRApplication
ExecutionException
public KNNClassificationConfig getKNNConfig()
public void setK(int k)
k
- The k to set.public void setSimilFunc(LocalSimilarityFunction similFunc)
similFunc
- The similFunc to set.public void setClasifMethod(KNNClassificationMethod clasifMethod)
clasifMethod
- The clasifMethod to set.public double getFalseNegatives()
public double getFalsePositives()
public double getTruePositives()
public double getTrueNegatives()
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |