Class AMResults


  • public class AMResults
    extends java.lang.Object
    The results of running AM, containing the analogical effects of the individual training instances as well as the relevant supracontexts and overall class likelihoods.
    • Constructor Detail

      • AMResults

        public AMResults​(Lattice lattice,
                         SubcontextList subList,
                         weka.core.Instance testItem,
                         boolean linear,
                         Labeler labeler)
        Parameters:
        lattice - filled lattice, which contains the data for calculating the analogical set
        testItem - Exemplar being classified
        linear - True if counting of pointers should be done linearly; false if quadratically.
        labeler - The labeler that was used to assign contextual labels; this is made available for printing purposes.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getExemplarEffectMap

        public java.util.Map<weka.core.Instance,​java.math.BigDecimal> getExemplarEffectMap()
        Returns:
        A mapping between exemplars and their analogical effect (decimal percentage)
      • getExemplarPointers

        public java.util.Map<weka.core.Instance,​java.math.BigInteger> getExemplarPointers()
        Returns:
        Mapping of exemplars in the analogical set to the number of pointers to it
      • getTotalPointers

        public java.math.BigInteger getTotalPointers()
        Returns:
        The total number of pointers in this analogical set
      • getClassPointers

        public java.util.Map<java.lang.String,​java.math.BigInteger> getClassPointers()
        Returns:
        A mapping between a class value index the number of pointers pointing to it
      • getClassLikelihood

        public java.util.Map<java.lang.String,​java.math.BigDecimal> getClassLikelihood()
        Returns:
        A mapping between the class name and its selection probability
      • getClassifiedEx

        public weka.core.Instance getClassifiedEx()
        Returns:
        The exemplar which was classified
      • getClassProbability

        public java.math.BigDecimal getClassProbability()
        Returns:
        Probability of the predicted class
      • getPredictedClasses

        public java.util.Set<java.lang.String> getPredictedClasses()
        Returns:
        Index of the predicted class attribute value
      • getSupraList

        public java.util.Set<Supracontext> getSupraList()
        Returns:
        The Supracontexts that comprise the analogical set.
      • getSubcontexts

        public java.util.Set<Subcontext> getSubcontexts()
        Returns:
        All subcontexts contained in all of the supracntexts of the analogical set.
      • getGangEffects

        public java.util.List<GangEffect> getGangEffects()
        Returns:
        The gang effects, sorted by size of the effect and then alphabetically by the subcontext display label
      • getLabeler

        public Labeler getLabeler()
        Returns:
        The Labeler object that was used to assign all of the contextual labels.
      • getExpectedClassName

        public java.lang.String getExpectedClassName()
      • getJudgement

        public AMResults.Judgement getJudgement()
        Returns:
        a judgement of the prediction