com.rapidminer.operator.learner.tree
Class MultiCriterionDecisionStumps

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.learner.AbstractLearner
          extended by com.rapidminer.operator.learner.tree.MultiCriterionDecisionStumps
All Implemented Interfaces:
ConfigurationListener, PreviewListener, Learner, ParameterHandler, LoggingHandler

public class MultiCriterionDecisionStumps
extends AbstractLearner

A DecisionStump clone that allows to specify different utility functions. It is quick for nominal attributes, but does not yet apply pruning for continuos attributes. Currently it can only handle boolean class labels.

Author:
Martin Scholz

Nested Class Summary
static class MultiCriterionDecisionStumps.DecisionStumpModel
           
 
Field Summary
 
Fields inherited from class com.rapidminer.operator.learner.AbstractLearner
PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN
 
Constructor Summary
MultiCriterionDecisionStumps(OperatorDescription description)
           
 
Method Summary
protected  double[] computePriors(ExampleSet exampleSet)
           
protected  Model getBestModel()
           
 java.util.List<ParameterType> getParameterTypes()
          Adds the parameter &utility function".
protected  double getScore(double[] counts, boolean predictPositives)
          Computes the score for the specified utility function, the provided counts and class.
protected  void initHighscore()
           
 Model learn(ExampleSet exampleSet)
          Trains a model.
 boolean supportsCapability(LearnerCapability lc)
          Checks for Learner capabilities.
 
Methods inherited from class com.rapidminer.operator.learner.AbstractLearner
apply, getEstimatedPerformance, getInputClasses, getInputDescription, getOptimizationPerformance, getOutputClasses, getWeights, onlyWarnForNonSufficientCapabilities, shouldCalculateWeights, shouldDeliverOptimizationPerformance, shouldEstimatePerformance
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkDeprecations, checkForStop, checkIO, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInnerOperatorsXML, getInput, getInput, getInput, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getProcess, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, performAdditionalChecks, processFinished, processStarts, register, registerOperator, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, unregisterOperator, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.learner.Learner
getName
 

Constructor Detail

MultiCriterionDecisionStumps

public MultiCriterionDecisionStumps(OperatorDescription description)
Method Detail

supportsCapability

public boolean supportsCapability(LearnerCapability lc)
Description copied from interface: Learner
Checks for Learner capabilities. Should return true if the given capability is supported.


initHighscore

protected void initHighscore()

getBestModel

protected Model getBestModel()
Returns:
the best decision stump found

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

getScore

protected double getScore(double[] counts,
                          boolean predictPositives)
Computes the score for the specified utility function, the provided counts and class.


computePriors

protected double[] computePriors(ExampleSet exampleSet)
Parameters:
exampleSet - the exampleSet to get the weighted priors for
Returns:
a double[2] object, first parameter is p, second is n.

getParameterTypes

public java.util.List<ParameterType> getParameterTypes()
Adds the parameter &utility function".

Specified by:
getParameterTypes in interface ParameterHandler
Overrides:
getParameterTypes in class Operator


Copyright © 2001-2009 by Rapid-I