edu.udo.cs.yale.operator.learner.lazy
Class DefaultLearner
java.lang.Object
edu.udo.cs.yale.operator.Operator
edu.udo.cs.yale.operator.learner.AbstractLearner
edu.udo.cs.yale.operator.learner.lazy.DefaultLearner
- All Implemented Interfaces:
- ConfigurationListener, Learner
public class DefaultLearner
- extends AbstractLearner
This learner creates a model, that will simply predict a default value for
all examples, i.e. the average or median of the true labels (or the mode in
case of classification) or a fixed specified value. This learner can be used
to compare the results of "real" learning schemes with guessing.
- Version:
- $Id: DefaultLearner.java,v 1.21 2006/09/30 00:05:31 ingomierswa Exp $
- Author:
- Stefan Rueping, Ingo Mierswa
- See Also:
DefaultModel
Methods inherited from class edu.udo.cs.yale.operator.learner.AbstractLearner |
apply, checkLearnerCapabilities, getEstimatedPerformance, getInputClasses, getInputDescription, getOptimizationPerformance, getOutputClasses, getWeights, shouldCalculateWeights, shouldDeliverOptimizationPerformance, shouldEstimatePerformance |
Methods inherited from class edu.udo.cs.yale.operator.Operator |
addError, addValue, addWarning, apply, checkDeprecations, checkIO, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createExperimentTree, createFromXML, createMarkedExperimentTree, delete, experimentFinished, experimentStarts, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getErrorList, getExperiment, getInnerOperatorsXML, getInput, getInput, getInput, getIOContainerForInApplyLoopBreakpoint, getName, getNumberOfSteps, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsInt, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isEnabled, isParameterSet, logMessage, performAdditionalChecks, register, remove, rename, resume, setBreakpoint, setEnabled, setExperiment, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, writeXML |
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 |
METHODS
private static final java.lang.String[] METHODS
MEDIAN
public static final int MEDIAN
- See Also:
- Constant Field Values
AVERAGE
public static final int AVERAGE
- See Also:
- Constant Field Values
MODE
public static final int MODE
- See Also:
- Constant Field Values
CONSTANT
public static final int CONSTANT
- See Also:
- Constant Field Values
DefaultLearner
public DefaultLearner(OperatorDescription description)
supportsCapability
public boolean supportsCapability(LearnerCapability lc)
- Description copied from interface:
Learner
- Checks for Learner capabilities. Should return true if the given
capability is supported.
learn
public Model learn(ExampleSet exampleSet)
throws OperatorException
- Description copied from interface:
Learner
- Trains a model. This method should be called by apply() and is
implemented by subclasses.
- Throws:
OperatorException
getParameterTypes
public java.util.List<ParameterType> getParameterTypes()
- Description copied from class:
Operator
- Returns a list of ParameterTypes describing the parameters of
this operator. The default implementation returns an empty list if no
input objects can be retained and special parameters for those input
objects which can be prevented from being consumed.
- Overrides:
getParameterTypes
in class Operator
Copyright © 2001-2006