com.rapidminer.operator.learner.meta
Class MetaCost

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.OperatorChain
          extended by com.rapidminer.operator.learner.meta.AbstractMetaLearner
              extended by com.rapidminer.operator.learner.meta.MetaCost
All Implemented Interfaces:
ConfigurationListener, PreviewListener, Learner, ParameterHandler, LoggingHandler

public class MetaCost
extends AbstractMetaLearner

This operator uses a given cost matrix to compute label predictions according to classification costs. The method used by this operator is similar to MetaCost as described by Pedro Domingos.

Author:
Helge Homburg

Field Summary
static java.lang.String PARAMETER_COST_MATRIX
          The parameter name for "The cost matrix in Matlab single line format"
static java.lang.String PARAMETER_COST_MATRIX_FILE_LOCATION
          The parameter name for "File"
static java.lang.String PARAMETER_ITERATIONS
          The parameter name for "The number of iterations (base models).
static java.lang.String PARAMETER_LOCAL_RANDOM_SEED
          The parameter name for "Use the given random seed instead of global random numbers (-1: use global)"
static java.lang.String PARAMETER_SAMPLING_WITH_REPLACEMENT
          The parameter name for "Use sampling with replacement (true) or without (false)"
static java.lang.String PARAMETER_USE_SUBSET_FOR_TRAINING
          The parameter name for "Fraction of examples used for training.
 
Constructor Summary
MetaCost(OperatorDescription description)
           
 
Method Summary
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 Model learn(ExampleSet inputSet)
          Trains a model.
 boolean supportsCapability(LearnerCapability capability)
          Support polynominal labels.
 
Methods inherited from class com.rapidminer.operator.learner.meta.AbstractMetaLearner
apply, applyInnerLearner, getEstimatedPerformance, getInnerOperatorCondition, getInputClasses, getInputDescription, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getOutputClasses, getWeights, shouldCalculateWeights, shouldEstimatePerformance
 
Methods inherited from class com.rapidminer.operator.OperatorChain
addAddListener, addOperator, addOperator, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createProcessTree, getAllInnerOperators, getIndexOfOperator, getInnerOperatorForName, getInnerOperatorsXML, getNumberOfAllOperators, getNumberOfOperators, getOperator, getOperatorFromAll, getOperators, performAdditionalChecks, processFinished, processStarts, registerOperator, removeAddListener, removeOperator, shouldAddNonConsumedInput, shouldReturnInnerOutput, unregisterOperator
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkForStop, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, getAddOnlyAdditionalOutput, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, 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, register, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, 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 com.rapidminer.operator.learner.Learner
getName
 

Field Detail

PARAMETER_COST_MATRIX

public static final java.lang.String PARAMETER_COST_MATRIX
The parameter name for "The cost matrix in Matlab single line format"

See Also:
Constant Field Values

PARAMETER_COST_MATRIX_FILE_LOCATION

public static final java.lang.String PARAMETER_COST_MATRIX_FILE_LOCATION
The parameter name for "File"

See Also:
Constant Field Values

PARAMETER_USE_SUBSET_FOR_TRAINING

public static final java.lang.String PARAMETER_USE_SUBSET_FOR_TRAINING
The parameter name for "Fraction of examples used for training. Must be greater than 0 and should be lower than 1."

See Also:
Constant Field Values

PARAMETER_ITERATIONS

public static final java.lang.String PARAMETER_ITERATIONS
The parameter name for "The number of iterations (base models)."

See Also:
Constant Field Values

PARAMETER_SAMPLING_WITH_REPLACEMENT

public static final java.lang.String PARAMETER_SAMPLING_WITH_REPLACEMENT
The parameter name for "Use sampling with replacement (true) or without (false)"

See Also:
Constant Field Values

PARAMETER_LOCAL_RANDOM_SEED

public static final java.lang.String PARAMETER_LOCAL_RANDOM_SEED
The parameter name for "Use the given random seed instead of global random numbers (-1: use global)"

See Also:
Constant Field Values
Constructor Detail

MetaCost

public MetaCost(OperatorDescription description)
Method Detail

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

supportsCapability

public boolean supportsCapability(LearnerCapability capability)
Support polynominal labels. For all other capabilities, it checks for the underlying operator to see which capabilities are supported by them.

Specified by:
supportsCapability in interface Learner
Overrides:
supportsCapability in class AbstractMetaLearner

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.

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


Copyright © 2001-2009 by Rapid-I