edu.udo.cs.yale.operator.learner.meta
Class ClassificationByRegression

java.lang.Object
  extended by edu.udo.cs.yale.operator.Operator
      extended by edu.udo.cs.yale.operator.OperatorChain
          extended by edu.udo.cs.yale.operator.learner.meta.AbstractMetaLearner
              extended by 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

Field Summary
private  int numberOfClasses
           
 
Constructor Summary
ClassificationByRegression(OperatorDescription description)
           
 
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
 

Field Detail

numberOfClasses

private int numberOfClasses
Constructor Detail

ClassificationByRegression

public ClassificationByRegression(OperatorDescription description)
Method Detail

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