java.lang.Cloneable
, ClassificationStatisticsPresenter
, SimpleClassifierWrapper
public class WekaMethodWrapper extends java.lang.Object implements SimpleClassifierWrapper, ClassificationStatisticsPresenter
Constructor | Description |
---|---|
WekaMethodWrapper() |
|
WekaMethodWrapper(java.lang.String fileName) |
|
WekaMethodWrapper(java.lang.String learningSetFileName,
java.lang.String testSetFileName) |
|
WekaMethodWrapper(WekaClassificationMethod baseMethod) |
|
WekaMethodWrapper(MemoryContainer learningMemoryContainer) |
|
WekaMethodWrapper(MemoryContainer learningMemoryContainer,
MemoryContainer testMemoryContainer) |
Modifier and Type | Method | Description |
---|---|---|
void |
build() |
|
void |
build(MemoryContainer learningMemoryContainer) |
Builds a classifier from the learing data
|
java.lang.String |
classificationStatisticsToString() |
|
ClassificationResult |
classify(int exampleId) |
Classifies example with index
example_id from the test container that has to be set first. |
ClassificationResult |
classify(Example example) |
Classifies an example
|
java.lang.Object |
clone() |
|
ClassificationResultsFoldValidationContainer |
crossValidate(WekaClassificationMethod baseMethod,
int n) |
Validates the weka classifier generated on learning data set.
|
ClassificationResultsFoldValidationContainer |
crossValidate(WekaClassificationMethod baseMethod,
int n,
int decisionAttributeIndex) |
Cross validates the weka classifier generated on learning data set.
|
ClassificationResultsFoldValidationContainer |
crossValidate(WekaClassificationMethod baseMethod,
int n,
long seed) |
Validates the weka classifier generated on learning data set.
|
ClassificationResultsFoldValidationContainer |
crossValidate(WekaClassificationMethod baseMethod,
int n,
long seed,
int decisionAttributeIndex) |
Cross validates the rule classifier that is bulid on rules from
rulesContainer on a suplemented testContainer. |
ClassificationStatisticsCollector |
getClassificationStatisticsCollector() |
|
MemoryContainer |
getLearningMemoryContainer() |
|
WekaClassificationMethod |
getMethod() |
|
java.lang.String |
getResultsFileName() |
|
MemoryContainer |
getTestMemoryContainer() |
|
void |
setLearningMemoryContainer(WekaTransferableMemoryContainer learningMemoryContainer) |
|
void |
setMethod(WekaClassificationMethod baseMethod,
boolean methodValid) |
Sets WEKA classification method
|
void |
setResultsFileName(java.lang.String fileName) |
|
void |
setTestMemoryContainer(WekaTransferableMemoryContainer testMemoryContainer) |
|
java.lang.String |
toString() |
|
ClassificationResultsValidationContainer |
validate() |
Validates the weka classifier generated on learning data set.
|
ClassificationResultsValidationContainer |
validate(WekaClassificationMethod baseMethod,
boolean methodValid) |
Validates the weka classifier generated on learning data set.
|
ClassificationResultsValidationContainer |
validate(WekaClassificationMethod baseMethod,
MemoryContainer testMemoryContainer,
boolean methodValid) |
Validates the weka classifier generated on learning data set.
|
ClassificationResultsValidationContainer |
validate(WekaClassificationMethod baseMethod,
MemoryContainer testMemoryContainer,
int decisionAttributeIndex) |
Validates the weka classifier generated on learning data set.
|
ClassificationResultsContainer |
validate(MemoryContainer testContainer) |
Validates the classifer on the test container
testContainer . |
public WekaMethodWrapper()
public WekaMethodWrapper(WekaClassificationMethod baseMethod)
public WekaMethodWrapper(MemoryContainer learningMemoryContainer)
public WekaMethodWrapper(java.lang.String fileName)
public WekaMethodWrapper(MemoryContainer learningMemoryContainer, MemoryContainer testMemoryContainer)
public WekaMethodWrapper(java.lang.String learningSetFileName, java.lang.String testSetFileName)
public void build(MemoryContainer learningMemoryContainer)
SimpleClassifierWrapper
build
in interface SimpleClassifierWrapper
learningMemoryContainer
- learning datapublic void build()
public ClassificationResultsValidationContainer validate()
validate
in interface SimpleClassifierWrapper
public ClassificationResultsValidationContainer validate(WekaClassificationMethod baseMethod, boolean methodValid)
baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.methodValid
- specifies whether methods needs to be build.public ClassificationResultsContainer validate(MemoryContainer testContainer)
SimpleClassifierWrapper
testContainer
.validate
in interface SimpleClassifierWrapper
testContainer
- container with examples to be validatedpublic ClassificationResultsValidationContainer validate(WekaClassificationMethod baseMethod, MemoryContainer testMemoryContainer, boolean methodValid)
baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.testMemoryContainer
- memory container with test objects to be
validated.methodValid
- specifies whether methods needs to be build.public ClassificationResultsValidationContainer validate(WekaClassificationMethod baseMethod, MemoryContainer testMemoryContainer, int decisionAttributeIndex) throws UnknownValueException
baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.testMemoryContainer
- memory container with test objects to be
validated.decisionAttributeIndex
- index of decision attribute in test.
memory container.UnknownValueException
public ClassificationResult classify(Example example)
SimpleClassifierWrapper
classify
in interface SimpleClassifierWrapper
example
- example to be classifiedpublic ClassificationResult classify(int exampleId) throws UnknownValueException
SimpleClassifierWrapper
example_id
from the test container that has to be set first.classify
in interface SimpleClassifierWrapper
exampleId
- id of the example from the test set that is intended to be classifiedUnknownValueException
public ClassificationResultsFoldValidationContainer crossValidate(WekaClassificationMethod baseMethod, int n)
baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.n
- numer of cross validation folds.public ClassificationResultsFoldValidationContainer crossValidate(WekaClassificationMethod baseMethod, int n, int decisionAttributeIndex)
baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.n
- numer of cross validation folds.decisionAttributeIndex
- index of decision attribute in test.
memory container.public ClassificationResultsFoldValidationContainer crossValidate(WekaClassificationMethod baseMethod, int n, long seed)
baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.n
- numer of cross validation folds.seed
- random number generator seed.public ClassificationResultsFoldValidationContainer crossValidate(WekaClassificationMethod baseMethod, int n, long seed, int decisionAttributeIndex)
rulesContainer
on a suplemented testContainer.baseMethod
- classification method class; it is not necessary to set
rules container for this class since they are set inside this
method before validation is made.n
- numer of cross validation folds.seed
- random number generator seed.decisionAttributeIndex
- index of decision attribute in test.
memory container.public void setResultsFileName(java.lang.String fileName)
public MemoryContainer getLearningMemoryContainer()
public void setLearningMemoryContainer(WekaTransferableMemoryContainer learningMemoryContainer)
public WekaClassificationMethod getMethod()
public void setMethod(WekaClassificationMethod baseMethod, boolean methodValid)
baseMethod
- method to be used in validation.methodValid
- specifies whether methods needs to be build.public MemoryContainer getTestMemoryContainer()
public void setTestMemoryContainer(WekaTransferableMemoryContainer testMemoryContainer)
public java.lang.String getResultsFileName()
public java.lang.Object clone()
clone
in interface SimpleClassifierWrapper
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String classificationStatisticsToString()
classificationStatisticsToString
in interface ClassificationStatisticsPresenter
public ClassificationStatisticsCollector getClassificationStatisticsCollector()
getClassificationStatisticsCollector
in interface ClassificationStatisticsPresenter