com.rapidminer.operator.features.weighting
Class AbstractWeighting

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      extended by com.rapidminer.operator.Operator
          extended by com.rapidminer.operator.features.weighting.AbstractWeighting
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, CapabilityProvider, ParameterHandler, LoggingHandler, Observable<Operator>
Direct Known Subclasses:
AbstractEntropyWeighting, ChiSquaredWeighting, ComponentWeights, CorpusBasedFeatureWeighting, CorrelationWeighting, ExampleSet2AttributeWeights, NameBasedWeighting, OneRErrorWeighting, PCAWeighting, ReliefWeighting, StandardDeviationWeighting, SVMWeighting, SymmetricalUncertaintyOperator

public abstract class AbstractWeighting
extends Operator
implements CapabilityProvider

This is an abstract superclass for RapidMiner weighting operators. New weighting schemes should extend this class to support the same normalization parameter as other weighting operators.

Author:
Helge Homburg

Field Summary
static java.lang.String PARAMETER_NORMALIZE_WEIGHTS
          The parameter name for "Activates the normalization of all weights.
static java.lang.String PARAMETER_SORT_DIRECTION
           
static java.lang.String PARAMETER_SORT_WEIGHTS
           
static int SORT_ASCENDING
           
static int SORT_DESCENDING
           
 
Fields inherited from interface com.rapidminer.operator.learner.CapabilityProvider
PROPERTY_RAPIDMINER_GENERAL_CAPABILITIES_WARN
 
Constructor Summary
AbstractWeighting(OperatorDescription description)
           
 
Method Summary
protected abstract  AttributeWeights calculateWeights(ExampleSet exampleSet)
           
 void doWork()
          Performs the actual work of the operator and must be implemented by subclasses.
 AttributeWeights doWork(ExampleSet exampleSet)
          Helper method for anonymous instances of this class.
 InputPort getExampleSetInputPort()
           
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 OutputPort getWeightsOutputPort()
           
protected  boolean isExampleSetMandatory()
           
protected  boolean onlyWarnForNonSufficientCapabilities()
           
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, assumePreconditionsSatisfied, checkAll, checkAllExcludingMetaData, checkDeprecations, checkForStop, checkIO, checkProperties, clear, clearErrorList, cloneOperator, collectErrors, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, freeMemory, getAddOnlyAdditionalOutput, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getResourceConsumptionEstimator, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isEnabled, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, lookupOperator, makeDirty, makeDirtyOnUpdate, notifyRenaming, performAdditionalChecks, preAutoWire, processFinished, processStarts, producesOutput, propagateDirtyness, register, registerOperator, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, unregisterOperator, updateExecutionOrder, walk, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
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.CapabilityProvider
supportsCapability
 

Field Detail

SORT_ASCENDING

public static final int SORT_ASCENDING
See Also:
Constant Field Values

SORT_DESCENDING

public static final int SORT_DESCENDING
See Also:
Constant Field Values

PARAMETER_NORMALIZE_WEIGHTS

public static final java.lang.String PARAMETER_NORMALIZE_WEIGHTS
The parameter name for "Activates the normalization of all weights."

See Also:
Constant Field Values

PARAMETER_SORT_WEIGHTS

public static final java.lang.String PARAMETER_SORT_WEIGHTS
See Also:
Constant Field Values

PARAMETER_SORT_DIRECTION

public static final java.lang.String PARAMETER_SORT_DIRECTION
See Also:
Constant Field Values
Constructor Detail

AbstractWeighting

public AbstractWeighting(OperatorDescription description)
Method Detail

calculateWeights

protected abstract AttributeWeights calculateWeights(ExampleSet exampleSet)
                                              throws OperatorException
Throws:
OperatorException

doWork

public AttributeWeights doWork(ExampleSet exampleSet)
                        throws OperatorException
Helper method for anonymous instances of this class.

Throws:
OperatorException

doWork

public void doWork()
            throws OperatorException
Description copied from class: Operator
Performs the actual work of the operator and must be implemented by subclasses. Replaces the old method apply().

Overrides:
doWork in class Operator
Throws:
OperatorException

getExampleSetInputPort

public InputPort getExampleSetInputPort()

getWeightsOutputPort

public OutputPort getWeightsOutputPort()

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. ATTENTION! This will create new parameterTypes. For calling already existing parameter types use getParameters().getParameterTypes();

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

isExampleSetMandatory

protected boolean isExampleSetMandatory()

onlyWarnForNonSufficientCapabilities

protected boolean onlyWarnForNonSufficientCapabilities()


Copyright © 2001-2009 by Rapid-I