edu.udo.cs.yale.operator.learner.meta
Class ClassificationByRegression
java.lang.Object
edu.udo.cs.yale.operator.Operator
edu.udo.cs.yale.operator.OperatorChain
edu.udo.cs.yale.operator.learner.meta.AbstractMetaLearner
edu.udo.cs.yale.operator.learner.meta.ClassificationByRegression
- All Implemented Interfaces:
- ConfigurationListener, Learner
public class ClassificationByRegression
- extends AbstractMetaLearner
For a classified dataset (with possibly more than two classes) builds a
classifier using a regression method which is specified by the inner
operator. For each class i a regression model is trained after
setting the label to +1 if the label equals i and
to -1 if it is not. Then the regression models are combined into
a classification model. In order to determine the prediction for an unlabeled
example, all models are applied and the class belonging to the regression
model which predicts the greatest value is chosen.
- Version:
- $Id: ClassificationByRegression.java,v 1.15 2006/03/21 15:35:48
ingomierswa Exp $
- Author:
- Ingo Mierswa, Simon Fischer
Method Summary |
int |
getNumberOfSteps()
Returns the number of steps performed by this chain.
|
Model |
learn(ExampleSet inputSet)
Trains a model.
|
boolean |
supportsCapability(LearnerCapability lc)
ClassificationByRegression supports all types of labels, so it would
return true for all class check otherwise, it gives a call to the
super.supportsCapability(...) method to check which attributes it
supports.
|
Methods inherited from class edu.udo.cs.yale.operator.learner.meta.AbstractMetaLearner |
apply, applyInnerLearner, checkLearnerCapabilities, getEstimatedPerformance, getInnerOperatorCondition, getInputClasses, getInputDescription, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getOutputClasses, getWeights, shouldCalculateWeights, shouldEstimatePerformance, shouldReturnInnerOutput |
Methods inherited from class edu.udo.cs.yale.operator.OperatorChain |
addAddListener, addOperator, addOperator, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clearErrorList, clearStepCounter, cloneOperator, countStep, createExperimentTree, delete, experimentFinished, experimentStarts, getAllInnerOperators, getCurrentStep, getIndexOfOperator, getInnerOperatorForName, getInnerOperatorsXML, getNumberOfAllOperators, getNumberOfChildrensSteps, getNumberOfOperators, getOperator, getOperatorFromAll, getOperators, isEnabled, performAdditionalChecks, removeAddListener, removeOperator, setEnabled, setExperiment |
Methods inherited from class edu.udo.cs.yale.operator.Operator |
addError, addValue, addWarning, apply, createExperimentTree, createFromXML, createMarkedExperimentTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getErrorList, getExperiment, getInput, getInput, getInput, getIOContainerForInApplyLoopBreakpoint, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsInt, getParameterAsString, getParameterList, getParameters, getParameterType, getParameterTypes, getParent, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isParameterSet, logMessage, register, remove, rename, resume, setBreakpoint, 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 |
numberOfClasses
private int numberOfClasses
ClassificationByRegression
public ClassificationByRegression(OperatorDescription description)
supportsCapability
public boolean supportsCapability(LearnerCapability lc)
- ClassificationByRegression supports all types of labels, so it would
return true for all class check otherwise, it gives a call to the
super.supportsCapability(...) method to check which attributes it
supports.
- Specified by:
supportsCapability
in interface Learner
- Overrides:
supportsCapability
in class AbstractMetaLearner
learn
public Model learn(ExampleSet inputSet)
throws OperatorException
- Description copied from interface:
Learner
- Trains a model. This method should be called by apply() and is
implemented by subclasses.
- Throws:
OperatorException
getNumberOfSteps
public int getNumberOfSteps()
- Description copied from class:
OperatorChain
- Returns the number of steps performed by this chain.
- Overrides:
getNumberOfSteps
in class AbstractMetaLearner
Copyright © 2001-2006