|
|||||||||
| 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.lazy.DefaultModel
public class DefaultModel
The default model sets the prediction of all examples to the mode value in case of nominal labels and to the average value in case of numerical labels.
| Field Summary | |
|---|---|
private double[] |
confidences
The confidence values for all predictions. |
private double |
value
The default prediction. |
| Constructor Summary | |
|---|---|
DefaultModel()
Creates a new default model after loading it from disk. |
|
DefaultModel(Attribute label,
double value)
Can be used to create a default model for regression tasks. |
|
DefaultModel(Attribute label,
double value,
double[] confidences)
Can be used to create a default model for classification tasks (confidence values should not be null in this case). |
|
| Method Summary | |
|---|---|
void |
performPrediction(ExampleSet exampleSet,
Attribute predictedLabelAttribute)
Iterates over all examples and applies the model to them. |
void |
readPredictionModelData(java.io.ObjectInputStream in)
Reads the model data from the input stream. |
java.lang.String |
toString()
|
void |
writePredictionModelData(java.io.ObjectOutputStream out)
Writes the model data into the output stream. |
| 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 |
|---|
equals, getExtension, getFileDescription, readModel, readModel, save, setParameter, writeModel, writeModel |
| Methods inherited from class edu.udo.cs.yale.operator.ResultObjectAdapter |
|---|
addAction, getActions, getName, getVisualisationComponent, toHTML, toResultString |
| 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, getName, getVisualisationComponent, toResultString |
| Methods inherited from interface edu.udo.cs.yale.operator.IOObject |
|---|
copy, write, write |
| Field Detail |
|---|
private double value
private double[] confidences
| Constructor Detail |
|---|
public DefaultModel()
public DefaultModel(Attribute label,
double value)
public DefaultModel(Attribute label,
double value,
double[] confidences)
| Method Detail |
|---|
public void performPrediction(ExampleSet exampleSet,
Attribute predictedLabelAttribute)
throws OperatorException
performPrediction in class PredictionModelOperatorException
public void readPredictionModelData(java.io.ObjectInputStream in)
throws java.io.IOException
readPredictionModelData in class PredictionModeljava.io.IOException
public void writePredictionModelData(java.io.ObjectOutputStream out)
throws java.io.IOException
writePredictionModelData in class PredictionModeljava.io.IOExceptionpublic java.lang.String toString()
toString in class PredictionModel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||