Class GaussianCumulative<T extends FeatureInput>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureUnary<T,T>
FeatureUnaryGeneric<T>
StatisticalBase<T>
GaussianCumulative<T>
- Type Parameters:
T
- the type ofFeatureInput
this feature operates on
Calculates a score between 0 and 1 based on the Cumulative Distribution Function (CDF) of a
Gaussian distribution. As the value approaches the mean, the score approaches 1.0.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double
deriveScore
(double featureValue, double mean, FeatureResultSupplier stdDev) Derive scores given the value, mean and standard deviation.boolean
If true, always returns 1.0 for values higher than the mean.boolean
If true, always returns 1.0 for values lower than the mean.boolean
If true, treats the higher side as if it's the full CDF.boolean
If true, treats the lower side as if it's 1 minus the full CDF.void
setIgnoreHigherSide
(boolean ignoreHigherSide) If true, always returns 1.0 for values higher than the mean.void
setIgnoreLowerSide
(boolean ignoreLowerSide) If true, always returns 1.0 for values lower than the mean.void
setRewardHigherSide
(boolean rewardHigherSide) If true, treats the higher side as if it's the full CDF.void
setRewardLowerSide
(boolean rewardLowerSide) If true, treats the lower side as if it's 1 minus the full CDF.Methods inherited from class org.anchoranalysis.plugin.operator.feature.bean.statistics.StatisticalBase
calculate, describeParameters, getItemMean, getItemStdDev, setItemMean, setItemStdDev
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
-
GaussianCumulative
public GaussianCumulative()
-
-
Method Details
-
deriveScore
protected double deriveScore(double featureValue, double mean, FeatureResultSupplier stdDev) throws FeatureCalculationException Description copied from class:StatisticalBase
Derive scores given the value, mean and standard deviation.- Specified by:
deriveScore
in classStatisticalBase<T extends FeatureInput>
- 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
-
isIgnoreHigherSide
public boolean isIgnoreHigherSide()If true, always returns 1.0 for values higher than the mean. -
setIgnoreHigherSide
public void setIgnoreHigherSide(boolean ignoreHigherSide) If true, always returns 1.0 for values higher than the mean. -
isIgnoreLowerSide
public boolean isIgnoreLowerSide()If true, always returns 1.0 for values lower than the mean. -
setIgnoreLowerSide
public void setIgnoreLowerSide(boolean ignoreLowerSide) If true, always returns 1.0 for values lower than the mean. -
isRewardHigherSide
public boolean isRewardHigherSide()If true, treats the higher side as if it's the full CDF. -
setRewardHigherSide
public void setRewardHigherSide(boolean rewardHigherSide) If true, treats the higher side as if it's the full CDF. -
isRewardLowerSide
public boolean isRewardLowerSide()If true, treats the lower side as if it's 1 minus the full CDF. -
setRewardLowerSide
public void setRewardLowerSide(boolean rewardLowerSide) If true, treats the lower side as if it's 1 minus the full CDF.
-