Class ExportFeatures<T extends InputFromManager, S, U extends FeatureInput>

Object
AnchorBean<Task<T, FeatureExporter<S>>>
Task<T, FeatureExporter<S>>
ExportFeatures<T,S,U>
Type Parameters:
T - See Task
S - a source-of-features that is duplicated for each new thread (to prevent any concurrency issues)
U - feature-input type for features bean-field

public class ExportFeatures<T extends InputFromManager, S, U extends FeatureInput> extends Task<T, FeatureExporter<S>>
Calculates features and exports them as a CSV file.

Aggregated-features (based upon a certain grouping) can also be calculated.

The following outputs are produced:

Output NameDefault?Description
"features"yesa single CSV file of feature-calculations where each row is an object.
"features""Aggregated"yesa single CSV file of feature-calculations where each row is a group (with aggregated features of the objects within).
"features""Group"noa CSV file of feature-calculations per group, where each row is an object.
"features""AggregatedGroup"noa XML file of aggregated feature-calculations per group
outputs from a sub-class of FeatureSource as used in source.
outputs from Task
outputs from FeatureResultsAndThumbnails
Author:
Owen Feehan
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final FeatureOutputNames
    Default names for various outputs from the task.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterAllJobsAreExecuted(FeatureExporter<S> sharedState, InputOutputContext context)
     
    beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<T> inputs, ParametersExperiment parameters)
     
    OutputEnabledMutable
     
    void
    doJobOnInput(InputBound<T, FeatureExporter<S>> input)
     
    List<NamedBean<FeatureListProvider<U>>>
    The features to be exported (after possibly some manipulation or augmentation).
    List<NamedBean<FeatureListProvider<FeatureInputResults>>>
    Features applied to each group to aggregate values (accepting FeatureInputResults).
    Grouper
    Includes an additional group column in CSVs, and creates group-specific feature files.
    DerivePath
    Translates an input file name to a unique ID.
    Source of feature-values to be exported.
    Visual style for how feature export occurs.
    boolean
     
    InputTypesExpected
     
    void
    setFeatures(List<NamedBean<FeatureListProvider<U>>> features)
    The features to be exported (after possibly some manipulation or augmentation).
    void
    setFeaturesAggregate(List<NamedBean<FeatureListProvider<FeatureInputResults>>> featuresAggregate)
    Features applied to each group to aggregate values (accepting FeatureInputResults).
    void
    setGroup(Grouper group)
    Includes an additional group column in CSVs, and creates group-specific feature files.
    void
    setId(DerivePath id)
    Translates an input file name to a unique ID.
    void
    Source of feature-values to be exported.
    void
    Visual style for how feature export occurs.

    Methods inherited from class org.anchoranalysis.experiment.bean.task.Task

    executeJob, isInputCompatibleWith

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • OUTPUT_NAMES

      public static final FeatureOutputNames OUTPUT_NAMES
      Default names for various outputs from the task.
  • Constructor Details

    • ExportFeatures

      public ExportFeatures()
  • Method Details

    • beforeAnyJobIsExecuted

      public FeatureExporter<S> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<T> inputs, ParametersExperiment parameters) throws ExperimentExecutionException
      Specified by:
      beforeAnyJobIsExecuted in class Task<T extends InputFromManager, FeatureExporter<S>>
      Throws:
      ExperimentExecutionException
    • doJobOnInput

      public void doJobOnInput(InputBound<T, FeatureExporter<S>> input) throws JobExecutionException
      Specified by:
      doJobOnInput in class Task<T extends InputFromManager, FeatureExporter<S>>
      Throws:
      JobExecutionException
    • afterAllJobsAreExecuted

      public void afterAllJobsAreExecuted(FeatureExporter<S> sharedState, InputOutputContext context) throws ExperimentExecutionException
      Specified by:
      afterAllJobsAreExecuted in class Task<T extends InputFromManager, FeatureExporter<S>>
      Throws:
      ExperimentExecutionException
    • defaultOutputs

      public OutputEnabledMutable defaultOutputs()
      Overrides:
      defaultOutputs in class Task<T extends InputFromManager, FeatureExporter<S>>
    • hasVeryQuickPerInputExecution

      public boolean hasVeryQuickPerInputExecution()
      Specified by:
      hasVeryQuickPerInputExecution in class Task<T extends InputFromManager, FeatureExporter<S>>
    • inputTypesExpected

      public InputTypesExpected inputTypesExpected()
      Specified by:
      inputTypesExpected in class Task<T extends InputFromManager, FeatureExporter<S>>
    • getSource

      public FeatureSource<T,S,U> getSource()
      Source of feature-values to be exported.
    • setSource

      public void setSource(FeatureSource<T,S,U> source)
      Source of feature-values to be exported.
    • getGroup

      public Grouper getGroup()
      Includes an additional group column in CSVs, and creates group-specific feature files.
    • setGroup

      public void setGroup(Grouper group)
      Includes an additional group column in CSVs, and creates group-specific feature files.
    • getId

      public DerivePath getId()
      Translates an input file name to a unique ID.
    • setId

      public void setId(DerivePath id)
      Translates an input file name to a unique ID.
    • getFeatures

      public List<NamedBean<FeatureListProvider<U>>> getFeatures()
      The features to be exported (after possibly some manipulation or augmentation).
    • setFeatures

      public void setFeatures(List<NamedBean<FeatureListProvider<U>>> features)
      The features to be exported (after possibly some manipulation or augmentation).
    • getFeaturesAggregate

      public List<NamedBean<FeatureListProvider<FeatureInputResults>>> getFeaturesAggregate()
      Features applied to each group to aggregate values (accepting FeatureInputResults).

      If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.

    • setFeaturesAggregate

      public void setFeaturesAggregate(List<NamedBean<FeatureListProvider<FeatureInputResults>>> featuresAggregate)
      Features applied to each group to aggregate values (accepting FeatureInputResults).

      If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.

    • getStyle

      public ExportFeaturesStyle getStyle()
      Visual style for how feature export occurs.
    • setStyle

      public void setStyle(ExportFeaturesStyle style)
      Visual style for how feature export occurs.