weka.knowledgeflow.steps

## Class ASEvaluator

- java.lang.Object
- - weka.knowledgeflow.steps.BaseStep
  - - weka.knowledgeflow.steps.WekaAlgorithmWrapper
    - - weka.knowledgeflow.steps.ASEvaluator

- All Implemented Interfaces:
    java.io.Serializable, BaseStepExtender, Step

      @KFStep(name="ASEvaluator",
              category="AttSelection",
              toolTipText="Weka attribute selection evaluator wrapper",
              iconPath="",
              resourceIntensive=true)
      public class ASEvaluator
      extends WekaAlgorithmWrapper

  Step that wraps a Weka attribute or subset evaluator. Handles training and test set connections. Requires an ASSearchStrategy step to be connected via an "info" connection. Will output both attribute selection results (via text connections) and transformed data (via outgoing train or test set connections). When processing multiple incoming training and test folds, the step can either output a cross-validation style summary over all the folds or individual attribute selection results for each fold.
  Version:
    $Revision: $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    `ASSearchStrategy`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ASEvaluator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCustomEditorForStep()` Get the class name of the custom editor for this step
    `ASEvaluation` | `getEvaluator()` Get the evaluator wrapped by this step
    `java.util.List<java.lang.String>` | `getIncomingConnectionTypes()` Get incoming connections accepted given the current state of the step
    `java.util.List<java.lang.String>` | `getOutgoingConnectionTypes()` Get a list of output connections that can be produced given the current state of the step
    `boolean` | `getTreatXValFoldsSeparately()` Get whether to output separate results for each fold of a cross-validation, rather than averaging over folds.
    `java.lang.Class` | `getWrappedAlgorithmClass()` Get the class of Weka algorithm wrapped by this wrapper
    `void` | `processIncoming(Data data)` Process an incoming Data object
    `void` | `setEvaluator(ASEvaluation eval)` Set the evaluator to wrap (just calls setWrappedAlgorithm)
    `void` | `setTreatXValFoldsSeparately(boolean treatSeparately)` Set whether to output separate results for each fold of a cross-validation, rather than averaging over folds.
    `void` | `setWrappedAlgorithm(java.lang.Object algo)` Set an instance of the wrapped algorithm to use
    `void` | `stepInit()` Initialize at the start of a run

    - ### Methods inherited from class weka.knowledgeflow.steps.WekaAlgorithmWrapper

      `getDefaultIconPath, getDefaultPackageLevelIconPath, getIconPath, getWrappedAlgorithm, globalInfo`

    - ### Methods inherited from class weka.knowledgeflow.steps.BaseStep

      `environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, start, stop`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ASEvaluator

          public ASEvaluator()

  - ### Method Detail

    - #### getWrappedAlgorithmClass

          public java.lang.Class getWrappedAlgorithmClass()

      Get the class of Weka algorithm wrapped by this wrapper
      Specified by:
        `getWrappedAlgorithmClass` in class `WekaAlgorithmWrapper`
      Returns:
        the wrapped algorithm class

    - #### setWrappedAlgorithm

          public void setWrappedAlgorithm(java.lang.Object algo)

      Set an instance of the wrapped algorithm to use
      Overrides:
        `setWrappedAlgorithm` in class `WekaAlgorithmWrapper`
      Parameters:
        `algo` - the algorithm to use

    - #### getEvaluator

          public ASEvaluation getEvaluator()

      Get the evaluator wrapped by this step
      Returns:
        the attribute or subset evaluator wrapped by this step

    - #### setEvaluator

          @ProgrammaticProperty
          public void setEvaluator(ASEvaluation eval)

      Set the evaluator to wrap (just calls setWrappedAlgorithm)
      Parameters:
        `eval` - the evaluator to use

    - #### setTreatXValFoldsSeparately

          @OptionMetadata(displayName="Treat x-val folds separately",
                          description="Output separate attribute selection results for each fold of a cross-validation (rather than averaging across folds)")
          public void setTreatXValFoldsSeparately(boolean treatSeparately)

      Set whether to output separate results for each fold of a cross-validation, rather than averaging over folds.
      Parameters:
        `treatSeparately` - true if each fold will have results output

    - #### getTreatXValFoldsSeparately

          public boolean getTreatXValFoldsSeparately()

      Get whether to output separate results for each fold of a cross-validation, rather than averaging over folds.
      Returns:
        true if each fold will have results output

    - #### stepInit

          public void stepInit()
                        throws WekaException

      Initialize at the start of a run
      Throws:
        `WekaException` - if there is an illegal configuration (i.e. Ranker search with subset evaluator or regular search with attribute evaluator

    - #### processIncoming

          public void processIncoming(Data data)
                               throws WekaException

      Process an incoming Data object
      Specified by:
        `processIncoming` in interface `BaseStepExtender`
      Specified by:
        `processIncoming` in interface `Step`
      Overrides:
        `processIncoming` in class `BaseStep`
      Parameters:
        `data` - the data object to process
      Throws:
        `WekaException` - if a problem occurs

    - #### getIncomingConnectionTypes

          public java.util.List<java.lang.String> getIncomingConnectionTypes()

      Get incoming connections accepted given the current state of the step
      Returns:
        a list of acceptable incoming connections

    - #### getOutgoingConnectionTypes

          public java.util.List<java.lang.String> getOutgoingConnectionTypes()

      Get a list of output connections that can be produced given the current state of the step
      Returns:
        a list of output connections

    - #### getCustomEditorForStep

          public java.lang.String getCustomEditorForStep()

      Get the class name of the custom editor for this step
      Specified by:
        `getCustomEditorForStep` in interface `Step`
      Overrides:
        `getCustomEditorForStep` in class `BaseStep`
      Returns:
        the class name of the custom editor for this step