|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.AbstractIOObject
edu.udo.cs.yale.operator.ResultObjectAdapter
edu.udo.cs.yale.operator.AbstractModel
edu.udo.cs.yale.operator.IOModel
edu.udo.cs.yale.operator.learner.PredictionModel
edu.udo.cs.yale.operator.learner.weka.WekaClassifier
public class WekaClassifier
A Weka Classifier which can be used to classify
Examples. It is learned by the GenericWekaLearner and the
GenericWekaMetaLearner.
| Field Summary | |
|---|---|
private weka.classifiers.Classifier |
classifier
The used weka classifier. |
private java.lang.String |
name
The name of the classifier. |
| Constructor Summary | |
|---|---|
WekaClassifier()
|
|
WekaClassifier(Attribute label)
|
|
WekaClassifier(java.lang.String name,
Attribute label,
weka.classifiers.Classifier classifier)
|
|
| Method Summary | |
|---|---|
void |
applyModelForInstance(weka.core.Instance instance,
Example e,
Attribute predictedLabelAttribute)
Classifies ervery weka instance and sets the result as predicted label of the current example. |
boolean |
equals(java.lang.Object o)
Returns true iff the given object has the same class. |
java.lang.String |
getName()
The default implementation returns the classname without package. |
java.awt.Component |
getVisualisationComponent(IOContainer container)
Returns a label that displays the ResultObjectAdapter.toResultString() result
encoded as html. |
void |
performPrediction(ExampleSet exampleSet,
Attribute predictedLabel)
Subclasses should iterated through the given example set and set the prediction for each example. |
void |
readPredictionModelData(java.io.ObjectInputStream in)
Reads the model data (without label). |
java.lang.String |
toResultString()
The default implementation simply returns the result of the method Object.toString(). |
java.lang.String |
toString()
|
void |
writePredictionModelData(java.io.ObjectOutputStream out)
Writes the model data (without label). |
| Methods inherited from class edu.udo.cs.yale.operator.learner.PredictionModel |
|---|
apply, createPredictedLabel, getLabel, readData, removePredictedLabel, setLabel, writeData |
| Methods inherited from class edu.udo.cs.yale.operator.AbstractModel |
|---|
getExtension, getFileDescription, readModel, readModel, save, setParameter, writeModel, writeModel |
| Methods inherited from class edu.udo.cs.yale.operator.ResultObjectAdapter |
|---|
addAction, getActions, toHTML |
| Methods inherited from class edu.udo.cs.yale.operator.AbstractIOObject |
|---|
copy, read, read, read, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.udo.cs.yale.operator.ResultObject |
|---|
getActions |
| Methods inherited from interface edu.udo.cs.yale.operator.IOObject |
|---|
copy, write, write |
| Field Detail |
|---|
private weka.classifiers.Classifier classifier
private java.lang.String name
| Constructor Detail |
|---|
public WekaClassifier()
public WekaClassifier(Attribute label)
public WekaClassifier(java.lang.String name,
Attribute label,
weka.classifiers.Classifier classifier)
| Method Detail |
|---|
public void performPrediction(ExampleSet exampleSet,
Attribute predictedLabel)
throws OperatorException
PredictionModel
performPrediction in class PredictionModelOperatorException
public void applyModelForInstance(weka.core.Instance instance,
Example e,
Attribute predictedLabelAttribute)
public void writePredictionModelData(java.io.ObjectOutputStream out)
throws java.io.IOException
PredictionModel
writePredictionModelData in class PredictionModeljava.io.IOException
public void readPredictionModelData(java.io.ObjectInputStream in)
throws java.io.IOException
PredictionModel
readPredictionModelData in class PredictionModeljava.io.IOExceptionpublic java.lang.String getName()
ResultObjectAdapter
getName in interface ResultObjectgetName in class ResultObjectAdapterpublic java.lang.String toString()
toString in class PredictionModelpublic java.lang.String toResultString()
ResultObjectAdapterObject.toString().
toResultString in interface ResultObjecttoResultString in class ResultObjectAdapterpublic java.awt.Component getVisualisationComponent(IOContainer container)
ResultObjectAdapterResultObjectAdapter.toResultString() result
encoded as html. Please note that the returned label is already enclosed
by a scroll pane. If you overwrite this method you should again ensure that
the returned component is scrollable. The given container is totally ignored.
getVisualisationComponent in interface ResultObjectgetVisualisationComponent in class ResultObjectAdapterpublic boolean equals(java.lang.Object o)
AbstractModel
equals in class AbstractModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||