Class StatisticalBase<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
StatisticalBase<T>
- Type Parameters:
T
- the type ofFeatureInput
this feature operates on
- Direct Known Subclasses:
GaussianCumulative
,ZScore
Calculates a score based upon the statistical mean and standard deviation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculate
(FeatureCalculationInput<T> input) Calculates a value for some input.protected abstract double
deriveScore
(double featureValue, double mean, FeatureResultSupplier stdDev) Derive scores given the value, mean and standard deviation.A human-readable description of the parameterization of the bean.TheFeature
used to calculate the mean.TheFeature
used to calculate the standard deviation.void
setItemMean
(Feature<T> itemMean) TheFeature
used to calculate the mean.void
setItemStdDev
(Feature<T> itemStdDev) TheFeature
used to calculate the standard deviation.Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, inputType, setItem
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
StatisticalBase
public StatisticalBase()
-
-
Method Details
-
calculate
Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<T extends FeatureInput>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classFeature<T extends FeatureInput>
- Returns:
- the description.
-
deriveScore
protected abstract double deriveScore(double featureValue, double mean, FeatureResultSupplier stdDev) throws FeatureCalculationException Derive scores given the value, mean and standard deviation.- Parameters:
featureValue
- the feature-value calculated fromFeatureUnary.getItem()
mean
- the meanstdDev
- a supplier for the standard deviation (if needed)- Returns:
- the derived score
- Throws:
FeatureCalculationException
- if the score calculation fails
-
getItemMean
TheFeature
used to calculate the mean. -
setItemMean
TheFeature
used to calculate the mean. -
getItemStdDev
TheFeature
used to calculate the standard deviation. -
setItemStdDev
TheFeature
used to calculate the standard deviation.
-