com.rapidminer.operator
Class AbstractModel
java.lang.Object
com.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
com.rapidminer.operator.AbstractModel
- All Implemented Interfaces:
- IOObject, Model, ResultObject, Readable, Reportable, LoggingHandler, java.io.Serializable
- Direct Known Subclasses:
- AbstractEigenvectorModel, ClusterModel, DimensionalityReducerModel, FastICAModel, GroupedModel, KernelPCAModel, PredictionModel, PreprocessingModel, SOMDimensionalityReductionModel
public abstract class AbstractModel
- extends ResultObjectAdapter
- implements Model
Abstract model is the superclass for all objects which change a data set. For
example, a model generated by a learner might add a predicted attribute.
Other models can be created during preprocessing, e.g. a transformation model
containing the parameters for a z-transformation. Models can be combined by
using a CombinedModel. All models can be applied with a ModelApplier
operator.
- Author:
- Ingo Mierswa
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
AbstractModel(ExampleSet exampleSet)
Created a new model which was built on the given example set. |
|
Method Summary |
java.lang.String |
getExtension()
|
java.lang.String |
getFileDescription()
|
java.lang.String |
getName()
The default implementation returns the result of the super class. |
HeaderExampleSet |
getTrainingHeader()
Delivers the training header example set, i.e. the header of the example set (without
data reference) which was used for creating this model. |
boolean |
isInTargetEncoding()
|
boolean |
isUpdatable()
This default implementation returns false. |
void |
setParameter(java.lang.String key,
java.lang.Object value)
Throws a UserError since most models should not allow additional
parameters during application. |
void |
updateModel(ExampleSet updateExampleSet)
This default implementation throws an UserError. |
| Methods inherited from class com.rapidminer.operator.ResultObjectAdapter |
addAction, getActions, getAnnotations, getResultIcon, log, log, logError, logNote, logWarning, toHTML, toResultString |
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
appendOperatorToHistory, copy, getLog, getProcessingHistory, getSource, initWriting, read, read, read, read, setLoggingHandler, setSource, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.Model |
apply |
AbstractModel
protected AbstractModel(ExampleSet exampleSet)
- Created a new model which was built on the given example set. Please note
that the given example set is automatically transformed into a
HeaderExampleSet
which means that no reference to the data itself is kept but only to the header, i.e.
to the attribute meta descriptions.
getTrainingHeader
public HeaderExampleSet getTrainingHeader()
- Delivers the training header example set, i.e. the header of the example set (without
data reference) which was used for creating this model. Might return null.
- Specified by:
getTrainingHeader in interface Model
isUpdatable
public boolean isUpdatable()
- This default implementation returns false. Note that subclasses overriding this
method should also override the method
updateModel(ExampleSet).
- Specified by:
isUpdatable in interface Model
updateModel
public void updateModel(ExampleSet updateExampleSet)
throws OperatorException
- This default implementation throws an
UserError.
Subclasses overriding this method to update the model according to the given
example set should also override the method isUpdatable() by
delivering true.
- Specified by:
updateModel in interface Model
- Throws:
OperatorException
setParameter
public void setParameter(java.lang.String key,
java.lang.Object value)
throws OperatorException
- Throws a UserError since most models should not allow additional
parameters during application. However, subclasses may overwrite this
method.
- Specified by:
setParameter in interface Model
- Throws:
OperatorException
getName
public java.lang.String getName()
- The default implementation returns the result of the super class. If the string ends with
model, the substring "model" is removed.
- Specified by:
getName in interface ResultObject- Overrides:
getName in class ResultObjectAdapter
getExtension
public java.lang.String getExtension()
getFileDescription
public java.lang.String getFileDescription()
isInTargetEncoding
public boolean isInTargetEncoding()
- Specified by:
isInTargetEncoding in interface Readable
Copyright © 2001-2009 by Rapid-I