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 ofFeatureInputthis 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 TypeMethodDescriptiondoublecalculate(FeatureCalculationInput<T> input) Calculates a value for some input.protected abstract doublederiveScore(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.TheFeatureused to calculate the mean.TheFeatureused to calculate the standard deviation.voidsetItemMean(Feature<T> itemMean) TheFeatureused to calculate the mean.voidsetItemStdDev(Feature<T> itemStdDev) TheFeatureused to calculate the standard deviation.Methods inherited from class org.anchoranalysis.feature.bean.operator.FeatureUnary
getItem, inputType, setItemMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods 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:FeatureCalculates a value for some input.- Specified by:
calculatein 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:FeatureA human-readable description of the parameterization of the bean.- Overrides:
describeParametersin 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
TheFeatureused to calculate the mean. -
setItemMean
TheFeatureused to calculate the mean. -
getItemStdDev
TheFeatureused to calculate the standard deviation. -
setItemStdDev
TheFeatureused to calculate the standard deviation.
-