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- 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 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 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
FieldsModifier and TypeFieldDescriptionstatic final FeatureOutputNamesDefault names for various outputs from the task. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAllJobsAreExecuted(FeatureExporter<S> sharedState, InputOutputContext context) beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<T> inputs, ParametersExperiment parameters) OutputEnabledMutablevoiddoJobOnInput(InputBound<T, FeatureExporter<S>> input) The features to be exported (after possibly some manipulation or augmentation).List<NamedBean<FeatureListProvider<FeatureInputResults>>> Features applied to each group to aggregate values (acceptingFeatureInputResults).GroupergetGroup()Includes an additional group column in CSVs, and creates group-specific feature files.DerivePathgetId()Translates an input file name to a unique ID.FeatureSource<T, S, U> Source of feature-values to be exported.getStyle()Visual style for how feature export occurs.booleanInputTypesExpectedvoidsetFeatures(List<NamedBean<FeatureListProvider<U>>> features) The features to be exported (after possibly some manipulation or augmentation).voidsetFeaturesAggregate(List<NamedBean<FeatureListProvider<FeatureInputResults>>> featuresAggregate) Features applied to each group to aggregate values (acceptingFeatureInputResults).voidsetGroup(Grouper group) Includes an additional group column in CSVs, and creates group-specific feature files.voidsetId(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, isInputCompatibleWithMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Field Details
-
OUTPUT_NAMES
public static final FeatureOutputNames OUTPUT_NAMESDefault 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:
beforeAnyJobIsExecutedin classTask<T extends InputFromManager, FeatureExporter<S>>- Throws:
ExperimentExecutionException
-
doJobOnInput
- Specified by:
doJobOnInputin classTask<T extends InputFromManager, FeatureExporter<S>>- Throws:
JobExecutionException
-
afterAllJobsAreExecuted
public void afterAllJobsAreExecuted(FeatureExporter<S> sharedState, InputOutputContext context) throws ExperimentExecutionException - Specified by:
afterAllJobsAreExecutedin classTask<T extends InputFromManager, FeatureExporter<S>>- Throws:
ExperimentExecutionException
-
defaultOutputs
public OutputEnabledMutable defaultOutputs()- Overrides:
defaultOutputsin classTask<T extends InputFromManager, FeatureExporter<S>>
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()- Specified by:
hasVeryQuickPerInputExecutionin classTask<T extends InputFromManager, FeatureExporter<S>>
-
inputTypesExpected
public InputTypesExpected inputTypesExpected()- Specified by:
inputTypesExpectedin classTask<T extends InputFromManager, FeatureExporter<S>>
-
getSource
Source of feature-values to be exported. -
setSource
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
-
setFeatures
-
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<NamedBean<FeatureListProvider<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.
-