|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.Operator
edu.udo.cs.yale.operator.OperatorChain
edu.udo.cs.yale.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 shoud extend this class to support the same parameters as other YALE learners. The main purpose of this class is to perform some compatibility checks.
| Constructor Summary | |
|---|---|
AbstractMetaLearner(OperatorDescription description)
|
|
| Method Summary | |
|---|---|
IOObject[] |
apply()
Trains a model using an ExampleSet from the input. |
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 |
checkLearnerCapabilities(ExampleSet exampleSet)
Checks if this learner can be used for the given example set, i.e. if it has sufficient capabilities. |
PerformanceVector |
getEstimatedPerformance()
The default implementation throws an exception. |
InnerOperatorCondition |
getInnerOperatorCondition()
Must return a condition of the IO behaviour of all desired inner operators. |
java.lang.Class[] |
getInputClasses()
Returns an array with one element: ExampleSet. |
InputDescription |
getInputDescription(java.lang.Class cls)
Indicates that the consumption of example sets can be user defined. |
int |
getMaxNumberOfInnerOperators()
Returns the maximum number of innner operators. |
int |
getMinNumberOfInnerOperators()
Returns the minimum number of innner operators. |
int |
getNumberOfSteps()
Returns the number of steps performed by this chain. |
java.lang.Class[] |
getOutputClasses()
Depending on the the learner capabilities (performance estimation, attribute weight calculation) the output classes are generated. |
AttributeWeights |
getWeights(ExampleSet exampleSet)
Returns the calculated weight vectors. |
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). |
boolean |
shouldReturnInnerOutput()
Returns true since this operator chain should just return the output of the last inner operator. |
boolean |
supportsCapability(LearnerCapability capability)
For all meta learners, it checks for the underlying operator to see which capabilities are supported by them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.udo.cs.yale.operator.learner.Learner |
|---|
getName, learn |
| Constructor Detail |
|---|
public AbstractMetaLearner(OperatorDescription description)
| Method Detail |
|---|
public IOObject[] apply()
throws OperatorException
apply in class OperatorChainOperatorException
public void checkLearnerCapabilities(ExampleSet exampleSet)
throws OperatorException
OperatorException
protected Model applyInnerLearner(ExampleSet exampleSet)
throws OperatorException
OperatorExceptionpublic int getNumberOfSteps()
OperatorChain
getNumberOfSteps in class OperatorChainpublic int getMinNumberOfInnerOperators()
OperatorChain
getMinNumberOfInnerOperators in class OperatorChainpublic int getMaxNumberOfInnerOperators()
OperatorChain
getMaxNumberOfInnerOperators in class OperatorChainpublic boolean shouldReturnInnerOutput()
shouldReturnInnerOutput in class OperatorChainpublic InnerOperatorCondition getInnerOperatorCondition()
OperatorChainSimpleChainInnerOperatorCondition. More than one
condition should be combined with help of the class
CombinedInnerOperatorCondition.
getInnerOperatorCondition in class OperatorChainpublic InputDescription getInputDescription(java.lang.Class cls)
getInputDescription in class Operatorpublic java.lang.Class[] getInputClasses()
getInputClasses 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 LearnerOperatorExceptionpublic boolean supportsCapability(LearnerCapability capability)
supportsCapability in interface Learnerpublic java.lang.Class[] getOutputClasses()
getOutputClasses in class Operator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||