public abstract class FeatureHistogramStatistic extends FeatureHistogram
FeatureHistogram
implementations that calculate a statistic from the
Histogram
.Constructor and Description |
---|
FeatureHistogramStatistic() |
Modifier and Type | Method and Description |
---|---|
double |
calculate(FeatureCalculationInput<FeatureInputHistogram> input)
Calculates a value for some input.
|
protected abstract double |
calculateStatisticFrom(Histogram histogram)
Calculates the statistic from the histogram, that is subsequently returned as the
feature-value.
|
double |
getValueIfEmpty()
The value to return iff
exceptionifEmpty is false. |
boolean |
isExceptionIfEmpty()
If true, then an exception is thrown if the histogram is empty, otherwise
valueIfEmpty is returned. |
void |
setExceptionIfEmpty(boolean exceptionIfEmpty)
If true, then an exception is thrown if the histogram is empty, otherwise
valueIfEmpty is returned. |
void |
setValueIfEmpty(double valueIfEmpty)
The value to return iff
exceptionifEmpty is false. |
inputType
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
public double calculate(FeatureCalculationInput<FeatureInputHistogram> input) throws FeatureCalculationException
Feature
calculate
in class Feature<FeatureInputHistogram>
input
- the input to the calculation.FeatureCalculationException
- if the calculation cannot successfully complete.protected abstract double calculateStatisticFrom(Histogram histogram) throws FeatureCalculationException
histogram
- the histogram to calculate the statistic from.FeatureCalculationException
- if the calculation cannot succeed.public boolean isExceptionIfEmpty()
valueIfEmpty
is returned.public void setExceptionIfEmpty(boolean exceptionIfEmpty)
valueIfEmpty
is returned.public double getValueIfEmpty()
exceptionifEmpty
is false.public void setValueIfEmpty(double valueIfEmpty)
exceptionifEmpty
is false.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.