Package weka.classifiers.lazy.AM.label
Class LongLabeler
- java.lang.Object
- 
- weka.classifiers.lazy.AM.label.Labeler
- 
- weka.classifiers.lazy.AM.label.LongLabeler
 
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class weka.classifiers.lazy.AM.label.LabelerLabeler.Partition
 
- 
 - 
Constructor SummaryConstructors Constructor Description LongLabeler(weka.core.Instance instance, boolean ignoreUnknowns, MissingDataCompare mdc)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelfromBits(int labelBits)For testing purposes, this method allows the client to directly specify the label using the bits of an integerLabelgetLatticeBottom()Creates and returns the label which belongs at the bottom of the boolean lattice formed by the subcontexts labeled by this labeler, i.e.LabelgetLatticeTop()Creates and returns the label which belongs at the top of the boolean lattice formed by the subcontexts labeled by this labeler, i.e.LongLabellabel(weka.core.Instance data)Create a context label for the input instance by comparing it with the test instance.Labelpartition(Label label, int partitionIndex)In distributed processing, it is necessary to split labels into partitions.- 
Methods inherited from class weka.classifiers.lazy.AM.label.LabelergetCardinality, getCardinality, getContextList, getContextString, getIgnoreUnknowns, getInstanceAttNamesList, getInstanceAttsString, getInstanceAttValuesList, getMissingDataCompare, getTestInstance, isIgnored, numPartitions
 
- 
 
- 
- 
- 
Constructor Detail- 
LongLabelerpublic LongLabeler(weka.core.Instance instance, boolean ignoreUnknowns, MissingDataCompare mdc)- Throws:
- java.lang.IllegalArgumentException- if the cardinality of the input instance is greater than- LongLabel.MAX_CARDINALITY.
 
 
- 
 - 
Method Detail- 
labelpublic LongLabel label(weka.core.Instance data) Description copied from class:LabelerCreate a context label for the input instance by comparing it with the test instance.- Specified by:
- labelin class- Labeler
- Parameters:
- data- Instance to be labeled
- Returns:
- the label for the context that the instance belongs to. The cardinality of the label will be the same as
 the test and data items. At any given index i, label.matches(i)will return true if that feature is the same in the test and data instances.
 
 - 
getLatticeToppublic Label getLatticeTop() Description copied from class:LabelerCreates and returns the label which belongs at the top of the boolean lattice formed by the subcontexts labeled by this labeler, i.e. the one for which every feature is a match.- Specified by:
- getLatticeTopin class- Labeler
- Returns:
- A label with all matches
 
 - 
getLatticeBottompublic Label getLatticeBottom() Description copied from class:LabelerCreates and returns the label which belongs at the bottom of the boolean lattice formed by the subcontexts labeled by this labeler, i.e. the one for which every feature is a mismatch.- Specified by:
- getLatticeBottomin class- Labeler
- Returns:
- A label with all mismatches
 
 - 
fromBitspublic Label fromBits(int labelBits) Description copied from class:LabelerFor testing purposes, this method allows the client to directly specify the label using the bits of an integer
 - 
partitionpublic Label partition(Label label, int partitionIndex) Description copied from class:LabelerIn distributed processing, it is necessary to split labels into partitions. This method returns a partition for the given label. A full label is partitioned into pieces 0 throughLabeler.numPartitions(), so code to process labels in pieces should look like this:Label myLabel = myLabeler.label(myInstance); for(int i = 0; i < myLabeler.numPartitions(); i++) process(myLabeler.partition(myLabel, i);
 
- 
 
-