com.rapidminer.operator.ports.metadata
Class CapabilityPrecondition

java.lang.Object
  extended by com.rapidminer.operator.ports.metadata.AbstractPrecondition
      extended by com.rapidminer.operator.ports.metadata.ExampleSetPrecondition
          extended by com.rapidminer.operator.ports.metadata.CapabilityPrecondition
All Implemented Interfaces:
Precondition
Direct Known Subclasses:
LearnerPrecondition

public class CapabilityPrecondition
extends ExampleSetPrecondition

This is a precondition for InputPorts that ensures that the capabilities given by an operator are matched by the delivered ExampleSet.

Author:
Sebastian Land

Field Summary
protected  CapabilityProvider capabilityProvider
           
 
Constructor Summary
CapabilityPrecondition(CapabilityProvider capabilityProvider, InputPort inputPort)
           
 
Method Summary
protected  void checkLabelPreconditions(ExampleSetMetaData metaData)
           
protected  void createLearnerError(java.lang.String description, java.util.List<? extends QuickFix> list)
           
protected  QuickFix createToBinominalFix(java.lang.String labelName)
          Creates a quickfix to convert to nominal.
protected  QuickFix createToNumericalFix(java.lang.String labelName)
          Creates a quickfix to convert to numerical.
protected  java.util.Collection<QuickFix> getFixesForClassificationWhenRegressionSupported()
          This method has to return a collection of quick fixes which are appropriate when regression is supported and the data needs classification.
protected  java.util.Collection<QuickFix> getFixesForPolynomialClassificationWhenBinominalSupported()
          This has to return a list of appropriate quick fixes in the case, that only binominal labels are supported but the data contains polynomials.
protected  java.util.List<QuickFix> getFixesForRegressionWhenClassificationSupported(AttributeMetaData labelMD)
          This method has to return a collection of quick fixes which are appropriate when classification is supported and the data needs regression.
 void makeAdditionalChecks(ExampleSetMetaData metaData)
          Can be implemented by subclasses.
 
Methods inherited from class com.rapidminer.operator.ports.metadata.ExampleSetPrecondition
assumeSatisfied, check, getDescription, getExpectedMetaData, isCompatible, setOptional
 
Methods inherited from class com.rapidminer.operator.ports.metadata.AbstractPrecondition
createError, createError, getInputPort, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

capabilityProvider

protected final CapabilityProvider capabilityProvider
Constructor Detail

CapabilityPrecondition

public CapabilityPrecondition(CapabilityProvider capabilityProvider,
                              InputPort inputPort)
Method Detail

makeAdditionalChecks

public void makeAdditionalChecks(ExampleSetMetaData metaData)
Description copied from class: ExampleSetPrecondition
Can be implemented by subclasses.

Overrides:
makeAdditionalChecks in class ExampleSetPrecondition

checkLabelPreconditions

protected void checkLabelPreconditions(ExampleSetMetaData metaData)

getFixesForRegressionWhenClassificationSupported

protected java.util.List<QuickFix> getFixesForRegressionWhenClassificationSupported(AttributeMetaData labelMD)
This method has to return a collection of quick fixes which are appropriate when classification is supported and the data needs regression. The default implementation will return fixes for discretization.


getFixesForClassificationWhenRegressionSupported

protected java.util.Collection<QuickFix> getFixesForClassificationWhenRegressionSupported()
This method has to return a collection of quick fixes which are appropriate when regression is supported and the data needs classification.


getFixesForPolynomialClassificationWhenBinominalSupported

protected java.util.Collection<QuickFix> getFixesForPolynomialClassificationWhenBinominalSupported()
This has to return a list of appropriate quick fixes in the case, that only binominal labels are supported but the data contains polynomials.


createToBinominalFix

protected QuickFix createToBinominalFix(java.lang.String labelName)
Creates a quickfix to convert to nominal.

Parameters:
labelName - If null, regular attributes will be converted. Otherwise the special attribute with the given name will be converted.

createToNumericalFix

protected QuickFix createToNumericalFix(java.lang.String labelName)
Creates a quickfix to convert to numerical.

Parameters:
labelName - If null, regular attributes will be converted. Otherwise the special attribute with the given name will be converted.

createLearnerError

protected void createLearnerError(java.lang.String description,
                                  java.util.List<? extends QuickFix> list)


Copyright © 2001-2009 by Rapid-I