Package weka.classifiers.lazy.AM.data
Class AMResults
- java.lang.Object
-
- weka.classifiers.lazy.AM.data.AMResults
-
public class AMResults extends java.lang.Object
The results of runningAM
, containing the analogical effects of the individual training instances as well as the relevant supracontexts and overall class likelihoods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AMResults.Judgement
static class
AMResults.PointerCountingStrategry
-
Constructor Summary
Constructors Constructor Description AMResults(Lattice lattice, SubcontextList subList, weka.core.Instance testItem, boolean linear, Labeler labeler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description weka.core.Instance
getClassifiedEx()
java.util.Map<java.lang.String,java.math.BigDecimal>
getClassLikelihood()
java.util.Map<java.lang.String,java.math.BigInteger>
getClassPointers()
java.math.BigDecimal
getClassProbability()
java.util.Map<weka.core.Instance,java.math.BigDecimal>
getExemplarEffectMap()
java.util.Map<weka.core.Instance,java.math.BigInteger>
getExemplarPointers()
java.lang.String
getExpectedClassName()
java.util.List<GangEffect>
getGangEffects()
AMResults.Judgement
getJudgement()
Labeler
getLabeler()
AMResults.PointerCountingStrategry
getPointerCountingStrategy()
java.util.Set<java.lang.String>
getPredictedClasses()
java.util.Set<Subcontext>
getSubcontexts()
SubcontextList
getSubList()
java.util.Set<Supracontext>
getSupraList()
java.math.BigInteger
getTotalPointers()
java.lang.String
toString()
-
-
-
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 settestItem
- Exemplar being classifiedlinear
- 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 classjava.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()
-
getSubList
public SubcontextList getSubList()
-
getJudgement
public AMResults.Judgement getJudgement()
- Returns:
- a judgement of the prediction
-
getPointerCountingStrategy
public AMResults.PointerCountingStrategry getPointerCountingStrategy()
-
-