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-fieldpublic class ExportFeatures<T extends InputFromManager,S,U extends FeatureInput> extends Task<T,FeatureExporter<S>>
Aggregated-features (based upon a certain grouping) can also be calculated.
The following outputs are produced:
Output Name | Default? | Description |
---|---|---|
yes | a single CSV file of feature-calculations where each row is an object. | |
yes | a single CSV file of feature-calculations where each row is a group (with aggregated features of the objects within). | |
no | a CSV file of feature-calculations per group, where each row is an object. | |
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 |
Modifier and Type | Field and Description |
---|---|
static FeatureOutputNames |
OUTPUT_RESULTS |
Constructor and Description |
---|
ExportFeatures() |
Modifier and Type | Method and Description |
---|---|
void |
afterAllJobsAreExecuted(FeatureExporter<S> sharedState,
InputOutputContext context)
Called once after all calls to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>) . |
FeatureExporter<S> |
beforeAnyJobIsExecuted(Outputter outputter,
ConcurrencyPlan concurrencyPlan,
List<T> inputs,
ParametersExperiment parameters)
Called once before all calls to
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>) . |
OutputEnabledMutable |
defaultOutputs()
If specified, default rules for determine which outputs are enabled or not.
|
void |
doJobOnInput(InputBound<T,FeatureExporter<S>> input)
Performs the task on a particular input.
|
List<NamedBean<FeatureListProvider<U>>> |
getFeatures()
The features to be exported (after possibly some manipulation or augmentation).
|
List<NamedBean<FeatureListProvider<FeatureInputResults>>> |
getFeaturesAggregate()
Features applied to each group to aggregate values (accepting
FeatureInputResults ). |
Grouper |
getGroup()
Includes an additional group column in CSVs, and creates group-specific feature files.
|
DerivePath |
getId()
Translates an input file name to a unique ID.
|
FeatureSource<T,S,U> |
getSource()
Source of feature-values to be exported.
|
ExportFeaturesStyle |
getStyle()
Visual style for how feature export occurs.
|
boolean |
hasVeryQuickPerInputExecution()
Is the execution-time of the task per-input expected to be very quick to execute?
|
InputTypesExpected |
inputTypesExpected()
Highest class(es) that will function as a valid input.
|
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 |
setSource(FeatureSource<T,S,U> source)
Source of feature-values to be exported.
|
void |
setStyle(ExportFeaturesStyle style)
Visual style for how feature export occurs.
|
executeJob, isInputCompatibleWith
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public static final FeatureOutputNames OUTPUT_RESULTS
public FeatureExporter<S> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<T> inputs, ParametersExperiment parameters) throws ExperimentExecutionException
Task
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.beforeAnyJobIsExecuted
in class Task<T extends InputFromManager,FeatureExporter<S>>
outputter
- the output-manager for the experiment (not for an individual job)concurrencyPlan
- available numbers of processors that can call Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
inputs
- a list of inputs, each will result in at least one call to Task.executeJob(ParametersUnbound)
.parameters
- the experiment-parameters.Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
and to Task.afterAllJobsAreExecuted(S, org.anchoranalysis.io.output.outputter.InputOutputContext)
.ExperimentExecutionException
- if a fatal error occurs executing this step of the
experiment.public void doJobOnInput(InputBound<T,FeatureExporter<S>> input) throws JobExecutionException
Task
doJobOnInput
in class Task<T extends InputFromManager,FeatureExporter<S>>
input
- the input for the job.JobExecutionException
- if an error occurs executing a particular job, that is not
otherwise suppressed.public void afterAllJobsAreExecuted(FeatureExporter<S> sharedState, InputOutputContext context) throws ExperimentExecutionException
Task
Task.executeJob(org.anchoranalysis.experiment.task.ParametersUnbound<T, S>)
.afterAllJobsAreExecuted
in class Task<T extends InputFromManager,FeatureExporter<S>>
sharedState
- the shared-statecontext
- IO-context for experiment (not for an individual job)ExperimentExecutionException
- if a fatal error occurs executing this step of the
experiment.public OutputEnabledMutable defaultOutputs()
Task
defaultOutputs
in class Task<T extends InputFromManager,FeatureExporter<S>>
public boolean hasVeryQuickPerInputExecution()
Task
hasVeryQuickPerInputExecution
in class Task<T extends InputFromManager,FeatureExporter<S>>
public InputTypesExpected inputTypesExpected()
Task
This is usually the class of T (or sometimes the absolute base class InputFromManager).
inputTypesExpected
in class Task<T extends InputFromManager,FeatureExporter<S>>
public FeatureSource<T,S,U> getSource()
public void setSource(FeatureSource<T,S,U> source)
public Grouper getGroup()
public void setGroup(Grouper group)
public DerivePath getId()
public void setId(DerivePath id)
public List<NamedBean<FeatureListProvider<U>>> getFeatures()
public void setFeatures(List<NamedBean<FeatureListProvider<U>>> features)
public List<NamedBean<FeatureListProvider<FeatureInputResults>>> getFeaturesAggregate()
FeatureInputResults
).
If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.
public void setFeaturesAggregate(List<NamedBean<FeatureListProvider<FeatureInputResults>>> featuresAggregate)
FeatureInputResults
).
If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.
public ExportFeaturesStyle getStyle()
public void setStyle(ExportFeaturesStyle style)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.