Package weka.classifiers.lazy.AM.data
Class SubcontextList
- java.lang.Object
- 
- weka.classifiers.lazy.AM.data.SubcontextList
 
- 
- All Implemented Interfaces:
- java.lang.Iterable<Subcontext>
 
 public class SubcontextList extends java.lang.Object implements java.lang.Iterable<Subcontext> This class creates and manages a list ofsubcontextsfrom a set of previously classified exemplars and an exemplar to be classified. After creating a list of subcontexts, iterate through the subcontexts using theIteratorreturned byiterator().
- 
- 
Constructor SummaryConstructors Constructor Description SubcontextList(Labeler labeler, java.util.List<weka.core.Instance> data, boolean ignoreFullMatches)This is the easiest to use constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Returns equals if both lists contain the same data in the same subcontexts.intgetCardinality()intgetConsideredExemplarCount()booleangetIgnoreFullMatches()LabelergetLabeler()java.util.Iterator<Subcontext>iterator()intsize()java.lang.StringtoString()This method is not particularly speedy, since it sorts the contained subcontexts by label.
 
- 
- 
- 
Constructor Detail- 
SubcontextListpublic SubcontextList(Labeler labeler, java.util.List<weka.core.Instance> data, boolean ignoreFullMatches) This is the easiest to use constructor. It creates and stores a list of subcontexts given classified exemplars and an exemplar to be classified.- Parameters:
- labeler- Labeler for assigning labels to items in data
- data- Training data (exemplars)
- ignoreFullMatches- if true, will not add entirely matching contexts
 
 
- 
 - 
Method Detail- 
getCardinalitypublic int getCardinality() - Returns:
- the number of attributes used to predict an outcome
 
 - 
getIgnoreFullMatchespublic boolean getIgnoreFullMatches() - Returns:
- True if instances with exact same attribute values as the test instance are removed from the list.
 
 - 
toStringpublic java.lang.String toString() This method is not particularly speedy, since it sorts the contained subcontexts by label. It is meant for test purposes only; do not rely on exact output being the same in the future.- Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object other) Returns equals if both lists contain the same data in the same subcontexts. Does not compare the Labeler object.- Overrides:
- equalsin class- java.lang.Object
 
 - 
iteratorpublic java.util.Iterator<Subcontext> iterator() - Specified by:
- iteratorin interface- java.lang.Iterable<Subcontext>
- Returns:
- An iterator which returns each of the contained subcontexts.
 
 - 
sizepublic int size() 
 - 
getConsideredExemplarCountpublic int getConsideredExemplarCount() - Returns:
- The number of exemplars considered accepted into the list, e.g. added and not ignored
 
 - 
getLabelerpublic Labeler getLabeler() - Returns:
- The labeler object used to assign incoming data to subcontexts.
 
 
- 
 
-