Package pulse.search.statistics
Class ModelSelectionCriterion
- java.lang.Object
-
- pulse.util.UpwardsNavigable
-
- pulse.util.Group
-
- pulse.util.Accessible
-
- pulse.util.PropertyHolder
-
- pulse.search.statistics.Statistic
-
- pulse.search.statistics.ModelSelectionCriterion
-
- All Implemented Interfaces:
Serializable,Descriptive,Reflexive
- Direct Known Subclasses:
AICStatistic,BICStatistic
public abstract class ModelSelectionCriterion extends Statistic
An abstract superclass for the BIC and AIC statistics.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModelSelectionCriterion(ModelSelectionCriterion another)ModelSelectionCriterion(OptimiserStatistic os)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcalcCriterion()This calculates either the AIC or BIC statistic, which only differ by the penalising term.abstract ModelSelectionCriterioncopy()booleanequals(Object obj)voidevaluate(GeneralTask t)intgetNumVariables()OptimiserStatisticgetOptimiserStatistic()NumericPropertygetStatistic()inthashCode()abstract doublepenalisingTerm(int k, int n)The penalising term, which is different depending on implementation.doubleprobability(List<ModelSelectionCriterion> all)Calculates the probability that this model is the best amongallothers.voidset(NumericPropertyKeyword key, NumericProperty p)An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)NumericProperties in subclasses ofAccessible.voidsetOptimiserStatistic(OptimiserStatistic os)voidsetStatistic(NumericProperty p)NumericPropertyweight(List<ModelSelectionCriterion> all)Calculates the weight (in the Akaike sense) when comparing the model associated with this statistic with other models represented by statistics of the same type.-
Methods inherited from class pulse.util.PropertyHolder
addListener, areDetailsHidden, data, describe, firePropertyChanged, getDescriptor, getListeners, getPrefix, ignoreSiblings, initListeners, isListedNumericType, isListedParameter, listedKeywords, listedTypes, numericData, parameterListChanged, removeListeners, setPrefix, updateProperties, updateProperty
-
Methods inherited from class pulse.util.Accessible
accessibleChildren, genericProperties, genericProperty, numericProperties, numericProperty, property, update, update
-
Methods inherited from class pulse.util.UpwardsNavigable
addHierarchyListener, getHierarchyListeners, getParent, identify, removeHierarchyListener, removeHierarchyListeners, setParent, specificAncestor, tellParent
-
-
-
-
Constructor Detail
-
ModelSelectionCriterion
public ModelSelectionCriterion(OptimiserStatistic os)
-
ModelSelectionCriterion
public ModelSelectionCriterion(ModelSelectionCriterion another)
-
-
Method Detail
-
evaluate
public void evaluate(GeneralTask t)
-
calcCriterion
public void calcCriterion()
This calculates either the AIC or BIC statistic, which only differ by the penalising term.- See Also:
penalisingTerm()
-
penalisingTerm
public abstract double penalisingTerm(int k, int n)The penalising term, which is different depending on implementation.- Parameters:
k- the number of model variablesn- the sample size- Returns:
- the penalising term
-
copy
public abstract ModelSelectionCriterion copy()
-
weight
public NumericProperty weight(List<ModelSelectionCriterion> all)
Calculates the weight (in the Akaike sense) when comparing the model associated with this statistic with other models represented by statistics of the same type.- Parameters:
the- selection statistics of the same type as this one- Returns:
- a
NumericPropertyof theMODEL_WEIGHTtype, which is the probability this model is the best one.
-
probability
public double probability(List<ModelSelectionCriterion> all)
Calculates the probability that this model is the best amongallothers.- Parameters:
all- statistics from models that will be compared with this one- Returns:
- the probability, which is a decimal value within the [0,1] range.
-
getNumVariables
public int getNumVariables()
-
getOptimiserStatistic
public OptimiserStatistic getOptimiserStatistic()
-
setOptimiserStatistic
public final void setOptimiserStatistic(OptimiserStatistic os)
-
setStatistic
public final void setStatistic(NumericProperty p)
-
getStatistic
public NumericProperty getStatistic()
-
set
public void set(NumericPropertyKeyword key, NumericProperty p)
Description copied from class:AccessibleAn abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer)
NumericProperties in subclasses ofAccessible. Typically this involves aswitchstatement that goes through the different options for thetypeand invokes differentset(...)methods to update the matchingNumericPropertywithproperty.- Specified by:
setin classAccessible- Parameters:
key- the type, which must be equal by definition toproperty.getType().p- the property, which contains new information.
-
-