|
|||||||||
| 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.weka.GenericWekaMetaLearner
public class GenericWekaMetaLearner
Performs the meta learning scheme of Weka with the same name. Another
non-meta learning scheme of Weka must be embedded as inner operator. See the
Weka javadoc for further classifier and parameter descriptions.
| Field Summary | |
|---|---|
private static java.lang.Class[] |
INPUT_CLASSES
|
private static java.lang.Class[] |
OUTPUT_CLASSES
|
static java.lang.String[] |
WEKA_CLASSIFIERS
|
private java.util.List<ParameterType> |
wekaParameters
The list with the weka parameters. |
| Constructor Summary | |
|---|---|
GenericWekaMetaLearner(OperatorDescription description)
|
|
| Method Summary | |
|---|---|
IOObject[] |
apply()
Applies all inner operators. |
PerformanceVector |
getEstimatedPerformance()
Returns the estimated performance. |
InnerOperatorCondition |
getInnerOperatorCondition()
Returns a simple chain condition. |
java.lang.Class[] |
getInputClasses()
Returns the classes that are needed as input. |
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()
Returns the classes that are guaranteed to be returned by apply() as additional output. |
java.util.List<ParameterType> |
getParameterTypes()
Returns a list of ParameterTypes describing the parameters of this operator. |
weka.core.TechnicalInformation |
getTechnicalInformation()
|
AttributeWeights |
getWeights(ExampleSet exampleSet)
Returns the calculated weight vectors. |
private weka.classifiers.Classifier |
getWekaClassifier(java.lang.String[] parameters)
Returns the Weka classifier based on the subtype of this operator. |
java.lang.String |
getWekaClassPath()
This method is used by the GenericWekaMetaLearner to specify the
learners name. |
java.util.List |
getWekaParameterList()
This method is used by the GenericWekaMetaLearner to specify the
learners parameters. |
private java.lang.String[] |
getWekaParameters()
This method uses some tool methods and the parameters from the inner learning scheme to build the Weka parameter style. |
Model |
learn(ExampleSet exampleSet)
Trains a model. |
void |
performAdditionalChecks()
This method invokes the additional check method for each child. |
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 |
supportsCapability(LearnerCapability capability)
Checks for Learner capabilities. |
| 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 |
| Field Detail |
|---|
private static final java.lang.Class[] INPUT_CLASSES
private static final java.lang.Class[] OUTPUT_CLASSES
public static final java.lang.String[] WEKA_CLASSIFIERS
private java.util.List<ParameterType> wekaParameters
| Constructor Detail |
|---|
public GenericWekaMetaLearner(OperatorDescription description)
| Method Detail |
|---|
public IOObject[] apply()
throws OperatorException
OperatorChainOperatorChain.clearStepCounter().
apply in class OperatorChainOperatorException
public Model learn(ExampleSet exampleSet)
throws OperatorException
Learner
learn in interface LearnerOperatorExceptionpublic java.lang.String getWekaClassPath()
GenericWekaMetaLearner to specify the
learners name.
public java.util.List getWekaParameterList()
GenericWekaMetaLearner to specify the
learners parameters.
private weka.classifiers.Classifier getWekaClassifier(java.lang.String[] parameters)
throws OperatorException
OperatorExceptionpublic weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandler
private java.lang.String[] getWekaParameters()
throws OperatorException
GenericWekaLearner, null will be returned. Calling
methods should usually throw an exception in this case.
OperatorExceptionpublic boolean supportsCapability(LearnerCapability capability)
Learner
supportsCapability in interface Learnerpublic 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 InputDescription getInputDescription(java.lang.Class cls)
getInputDescription in class Operatorpublic int getNumberOfSteps()
OperatorChain
getNumberOfSteps in class OperatorChainpublic int getMinNumberOfInnerOperators()
OperatorChain
getMinNumberOfInnerOperators in class OperatorChainpublic int getMaxNumberOfInnerOperators()
OperatorChain
getMaxNumberOfInnerOperators in class OperatorChainpublic java.lang.Class[] getOutputClasses()
OperatorOperator.getInputDescription(Class) and can be changed by
overwriting this method. Objects which are not consumed must not be
defined as additional output in this method. May be null or an empy array
(no additional output is produced).
getOutputClasses in class Operatorpublic java.lang.Class[] getInputClasses()
OperatorOperator.getOutputClasses() and
Operator.apply() if this is necessary. This default behavior can be
changed by overriding Operator.getInputDescription(Class). Subclasses
which implement this method should not make use of parameters since this
method is invoked by getParameterTypes(). Therefore, parameters are not
fully available at this point of time and this might lead to exceptions.
Please use InputDescriptions instead.
getInputClasses in class Operatorpublic InnerOperatorCondition getInnerOperatorCondition()
getInnerOperatorCondition in class OperatorChain
public void performAdditionalChecks()
throws UserError
OperatorChain
performAdditionalChecks in class OperatorChainUserErrorpublic java.util.List<ParameterType> getParameterTypes()
Operator
getParameterTypes in class Operator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||