Class AbstractMultiProbabilityAlignment<T>

  • Type Parameters:
    T - - the Type parameter usually representing the agent class.
    Direct Known Subclasses:
    LogitScalingAlignment, LogitScalingWeightedAlignment

    public abstract class AbstractMultiProbabilityAlignment<T>
    extends java.lang.Object
    Multiple choice alignment methods, where there are in general many (> 2) possible outcomes/states to align. Note that binary alignment (i.e. only two choices of state, such as true/false, transition/don't transition, male/female, alive/dead, etc.) can still be achieved using these methods for multiple alignment, however there are also other (legacy) options for Binary alignment (see microsim.alignment.probability package to align probabilities or microsim.alignment.outcome package to align outcomes). General principle of operation of this class: a) A variable is defined for the agents. b) Alignment is called to modify that variable, possibly making use of a specific process of the agents. ALIGNMENT OF PROBABILITIES: this requires a process to be specified that computes a set of probabilities of the potential outcomes of a given event. Alignment is then called to modify those probabilities. A second process is specified to determine the actual outcome of the event given the (modified) probabilities of the potential outcomes.
    Author:
    Matteo Richiardi and Ross Richardson
    • Constructor Detail

      • AbstractMultiProbabilityAlignment

        public AbstractMultiProbabilityAlignment()
    • Method Detail

      • align

        public abstract void align​(java.util.Collection<T> agents,
                                   org.apache.commons.collections4.Predicate<T> filter,
                                   AlignmentMultiProbabilityClosure<T> closure,
                                   double[] targetShare)
        Parameters:
        agents - - a collection of agents to potentially be aligned
        filter - - filters the agentList so that only the relevant sub-population of agents is aligned
        closure - - specifies the method returning the unaligned probabilities of outcomes for the agent and the method that samples the aligned probabilities to specify the outcome.
        targetShare - - a set of target shares of the relevant sub-population (specified as a proportion of the filtered population) for which the outcomes (defined by the AlignmentMultiProbabilityClosure) must be true.