|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.operator.AbstractModel
com.rapidminer.operator.learner.PredictionModel
public abstract class PredictionModel
PredictionModel is the superclass for all objects generated by learners, i.e. it can be used to create a prediction for a given example set.
| Constructor Summary | |
|---|---|
protected |
PredictionModel(ExampleSet trainingExampleSet)
Created a new prediction model which was built on the given example set. |
| Method Summary | |
|---|---|
ExampleSet |
apply(ExampleSet exampleSet)
Applies the model by creating a predicted label attribute and setting the predicted label values. |
protected void |
checkCompatibility(ExampleSet exampleSet)
This method is invoked before the model is actually applied. |
static void |
copyPredictedLabel(ExampleSet source,
ExampleSet destination)
Copies the predicted label from the source example set to the destination example set. |
static Attribute |
createPredictedLabel(ExampleSet exampleSet,
Attribute label)
Creates a predicted label for the given example set based on the label attribute defined for this prediction model. |
Attribute |
getLabel()
Returns the label attribute. |
abstract ExampleSet |
performPrediction(ExampleSet exampleSet,
Attribute predictedLabel)
Subclasses should iterate through the given example set and set the prediction for each example. |
static void |
removePredictedLabel(ExampleSet exampleSet)
Helper method in order to lower memory consumption. |
static void |
removePredictedLabel(ExampleSet exampleSet,
boolean removePredictionFromTable,
boolean removeConfidencesFromTable)
Helper method in order to lower memory consumption. |
java.lang.String |
toString()
|
| Methods inherited from class com.rapidminer.operator.AbstractModel |
|---|
getExtension, getFileDescription, getName, getResultIcon, getTrainingHeader, isUpdatable, setParameter, updateModel |
| Methods inherited from class com.rapidminer.operator.ResultObjectAdapter |
|---|
addAction, getActions, getVisualizationComponent, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString |
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.ResultObject |
|---|
getActions, getVisualizationComponent, toResultString |
| Methods inherited from interface com.rapidminer.operator.IOObject |
|---|
copy, getLog, getSource, setLoggingHandler, setSource, write |
| Methods inherited from interface com.rapidminer.operator.Saveable |
|---|
isSavable, save |
| Constructor Detail |
|---|
protected PredictionModel(ExampleSet trainingExampleSet)
HeaderExampleSet
which means that no reference to the data itself is kept but only to the header, i.e.
to the attribute meta descriptions.
| Method Detail |
|---|
public abstract ExampleSet performPrediction(ExampleSet exampleSet,
Attribute predictedLabel)
throws OperatorException
OperatorException
public ExampleSet apply(ExampleSet exampleSet)
throws OperatorException
OperatorExceptionpublic Attribute getLabel()
protected void checkCompatibility(ExampleSet exampleSet)
throws OperatorException
OperatorException
public static Attribute createPredictedLabel(ExampleSet exampleSet,
Attribute label)
exampleSet.replaceAttribute(predictedLabel, AttributeFactory.changeValueType(predictedLabel, Ontology.REAL)); .
This might be useful in cases where a crisp nominal prediction should be
replaced by confidence predictions.
public java.lang.String toString()
toString in interface ReadabletoString in class java.lang.Objectpublic static void removePredictedLabel(ExampleSet exampleSet)
public static void removePredictedLabel(ExampleSet exampleSet,
boolean removePredictionFromTable,
boolean removeConfidencesFromTable)
public static void copyPredictedLabel(ExampleSet source,
ExampleSet destination)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||