Class ExportFeatures<T extends org.anchoranalysis.io.input.InputFromManager,S,U extends org.anchoranalysis.feature.input.FeatureInput>
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,S>>
org.anchoranalysis.experiment.bean.task.Task<T,FeatureExporter<S>>
org.anchoranalysis.plugin.image.task.bean.feature.ExportFeatures<T,S,U>
- Type Parameters:
T- SeeTaskS- a source-of-features that is duplicated for each new thread (to prevent any concurrency issues)U- feature-input type forfeaturesbean-field
public class ExportFeatures<T extends org.anchoranalysis.io.input.InputFromManager,S,U extends org.anchoranalysis.feature.input.FeatureInput> extends org.anchoranalysis.experiment.bean.task.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 Name | Default? | Description |
|---|---|---|
| "features" | yes | a single CSV file of feature-calculations where each row is an object. |
| "features""Aggregated" | yes | a single CSV file of feature-calculations where each row is a group (with aggregated features of the objects within). |
| "features""Group" | no | a CSV file of feature-calculations per group, where each row is an object. |
| "features""AggregatedGroup" | no | a 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 org.anchoranalysis.feature.io.results.FeatureOutputNamesOUTPUT_NAMESDefault names for various outputs from the task. -
Constructor Summary
Constructors Constructor Description ExportFeatures() -
Method Summary
Modifier and Type Method Description voidafterAllJobsAreExecuted(FeatureExporter<S> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)FeatureExporter<S>beforeAnyJobIsExecuted(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<T> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters)org.anchoranalysis.io.output.enabled.OutputEnabledMutabledefaultOutputs()voiddoJobOnInput(org.anchoranalysis.experiment.task.InputBound<T,FeatureExporter<S>> input)List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>>getFeatures()The features to be exported (after possibly some manipulation or augmentation).List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>>getFeaturesAggregate()Features applied to each group to aggregate values (acceptingFeatureInputResults).org.anchoranalysis.io.input.bean.grouper.GroupergetGroup()Includes an additional group column in CSVs, and creates group-specific feature files.org.anchoranalysis.io.input.bean.path.DerivePathgetId()Translates an input file name to a unique ID.FeatureSource<T,S,U>getSource()Source of feature-values to be exported.ExportFeaturesStylegetStyle()Visual style for how feature export occurs.booleanhasVeryQuickPerInputExecution()org.anchoranalysis.experiment.task.InputTypesExpectedinputTypesExpected()voidsetFeatures(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> features)The features to be exported (after possibly some manipulation or augmentation).voidsetFeaturesAggregate(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> featuresAggregate)Features applied to each group to aggregate values (acceptingFeatureInputResults).voidsetGroup(org.anchoranalysis.io.input.bean.grouper.Grouper group)Includes an additional group column in CSVs, and creates group-specific feature files.voidsetId(org.anchoranalysis.io.input.bean.path.DerivePath id)Translates an input file name to a unique ID.voidsetSource(FeatureSource<T,S,U> source)Source of feature-values to be exported.voidsetStyle(ExportFeaturesStyle style)Visual style for how feature export occurs.Methods inherited from class org.anchoranalysis.experiment.bean.task.Task
executeJob, isInputCompatibleWith
-
Field Details
-
OUTPUT_NAMES
public static final org.anchoranalysis.feature.io.results.FeatureOutputNames OUTPUT_NAMESDefault names for various outputs from the task.
-
-
Constructor Details
-
ExportFeatures
public ExportFeatures()
-
-
Method Details
-
beforeAnyJobIsExecuted
public FeatureExporter<S> beforeAnyJobIsExecuted(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<T> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters) throws org.anchoranalysis.experiment.ExperimentExecutionException- Specified by:
beforeAnyJobIsExecutedin classorg.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,FeatureExporter<S>>- Throws:
org.anchoranalysis.experiment.ExperimentExecutionException
-
doJobOnInput
public void doJobOnInput(org.anchoranalysis.experiment.task.InputBound<T,FeatureExporter<S>> input) throws org.anchoranalysis.experiment.JobExecutionException- Specified by:
doJobOnInputin classorg.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,FeatureExporter<S>>- Throws:
org.anchoranalysis.experiment.JobExecutionException
-
afterAllJobsAreExecuted
public void afterAllJobsAreExecuted(FeatureExporter<S> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException- Specified by:
afterAllJobsAreExecutedin classorg.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,FeatureExporter<S>>- Throws:
org.anchoranalysis.experiment.ExperimentExecutionException
-
defaultOutputs
public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()- Overrides:
defaultOutputsin classorg.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,FeatureExporter<S>>
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()- Specified by:
hasVeryQuickPerInputExecutionin classorg.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,FeatureExporter<S>>
-
inputTypesExpected
public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()- Specified by:
inputTypesExpectedin classorg.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,FeatureExporter<S>>
-
getSource
Source of feature-values to be exported. -
setSource
Source of feature-values to be exported. -
getGroup
public org.anchoranalysis.io.input.bean.grouper.Grouper getGroup()Includes an additional group column in CSVs, and creates group-specific feature files. -
setGroup
public void setGroup(org.anchoranalysis.io.input.bean.grouper.Grouper group)Includes an additional group column in CSVs, and creates group-specific feature files. -
getId
public org.anchoranalysis.io.input.bean.path.DerivePath getId()Translates an input file name to a unique ID. -
setId
public void setId(org.anchoranalysis.io.input.bean.path.DerivePath id)Translates an input file name to a unique ID. -
getFeatures
public List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> getFeatures()The features to be exported (after possibly some manipulation or augmentation). -
setFeatures
public void setFeatures(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> features)The features to be exported (after possibly some manipulation or augmentation). -
getFeaturesAggregate
public List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> getFeaturesAggregate()Features applied to each group to aggregate values (acceptingFeatureInputResults).If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.
-
setFeaturesAggregate
public void setFeaturesAggregate(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> featuresAggregate)Features applied to each group to aggregate values (acceptingFeatureInputResults).If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.
-
getStyle
Visual style for how feature export occurs. -
setStyle
Visual style for how feature export occurs.
-