|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.AbstractObservable<Operator>
com.rapidminer.operator.Operator
com.rapidminer.operator.OperatorChain
com.rapidminer.operator.learner.meta.AbstractMetaLearner
public abstract class AbstractMetaLearner
A MetaLearner is an operator that encapsulates one or more learning steps to build its model. New meta learning schemes should extend this class to support the same parameters as other learners. The main purpose of this class is to perform some compatibility checks.
| Field Summary | |
|---|---|
protected InputPort |
exampleSetInput
|
protected InputPort |
innerModelSink
|
| Fields inherited from interface com.rapidminer.operator.learner.CapabilityProvider |
|---|
PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN |
| Constructor Summary | |
|---|---|
AbstractMetaLearner(OperatorDescription description)
|
|
| Method Summary | |
|---|---|
protected Model |
applyInnerLearner(ExampleSet exampleSet)
This is a convenience method to apply the inner operators and return the model which must be output of the last operator. |
void |
doWork()
Trains a model using an ExampleSet from the input. |
protected void |
executeInnerLearner()
|
PerformanceVector |
getEstimatedPerformance()
The default implementation throws an exception. |
InputPort |
getInnerModelSink()
|
OutputPort |
getModelOutputPort()
|
InputPort |
getTrainingSetInputPort()
|
AttributeWeights |
getWeights(ExampleSet exampleSet)
Returns the calculated weight vectors. |
protected MetaData |
modifyExampleSetMetaData(ExampleSetMetaData unmodifiedMetaData)
This method can be used by subclasses to additionally change the example set meta data delivered to the inner learner |
protected MetaData |
modifyGeneratedModelMetaData(PredictionModelMetaData unmodifiedMetaData)
Modifies the meta data of the generated model. |
boolean |
shouldAutoConnect(OutputPort port)
By default, all ports will be auto-connected by ExecutionUnit.autoWire(CompatibilityLevel, boolean, boolean). |
boolean |
shouldCalculateWeights()
Returns true if the user wants to calculate feature weights (depending on a parameter). |
boolean |
shouldEstimatePerformance()
Returns true if the user wants to estimate the performance (depending on a parameter). |
| Methods inherited from class com.rapidminer.tools.AbstractObservable |
|---|
addObserver, addObserverAsFirst, fireUpdate, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.learner.Learner |
|---|
getName, learn |
| Methods inherited from interface com.rapidminer.operator.learner.CapabilityProvider |
|---|
supportsCapability |
| Field Detail |
|---|
protected final InputPort exampleSetInput
protected final InputPort innerModelSink
| Constructor Detail |
|---|
public AbstractMetaLearner(OperatorDescription description)
| Method Detail |
|---|
protected MetaData modifyGeneratedModelMetaData(PredictionModelMetaData unmodifiedMetaData)
protected MetaData modifyExampleSetMetaData(ExampleSetMetaData unmodifiedMetaData)
public InputPort getTrainingSetInputPort()
public OutputPort getModelOutputPort()
public InputPort getInnerModelSink()
public void doWork()
throws OperatorException
doWork in class OperatorChainOperatorException
protected Model applyInnerLearner(ExampleSet exampleSet)
throws OperatorException
OperatorException
protected void executeInnerLearner()
throws OperatorException
OperatorExceptionpublic boolean shouldAutoConnect(OutputPort port)
OperatorExecutionUnit.autoWire(CompatibilityLevel, boolean, boolean).
Optional outputs were handled up to version 4.4 by parameters. From 5.0 on,
optional outputs are computed iff the corresponding port is connected. For backward
compatibility, operators can check if we should auto-connect a port by overriding
this method (e.g. by checking a deprecated parameter).
TODO: Remove in later versions
shouldAutoConnect in class Operatorpublic boolean shouldEstimatePerformance()
shouldEstimatePerformance in interface Learnerpublic boolean shouldCalculateWeights()
shouldCalculateWeights in interface Learner
public PerformanceVector getEstimatedPerformance()
throws OperatorException
getEstimatedPerformance in interface LearnerOperatorException
public AttributeWeights getWeights(ExampleSet exampleSet)
throws OperatorException
getWeights in interface LearnerOperatorException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||