edu.cmu.minorthird.classify.sequential
Interface CandidateSegmentGroup

All Superinterfaces:
HasSubpopulationId
All Known Implementing Classes:
CompactCandidateSegmentGroup, MutableCandidateSegmentGroup

public interface CandidateSegmentGroup
extends HasSubpopulationId

A group of sliding windows associated with a sequence.

In more detail: just as a SequenceDataset holds a set of Example[] objects, a SegmentDataset holds a set of CandidateSegmentGroup objects. Each CandidateSegmentGroup is derived from a sequence of source objects s1....sN. The CandidateSegmentGroup holds an instance for each subsequence of up to K adjacent source objects (the subsequence is called a segment, or a sliding window). Here K is the "maxWindowSize", and N is the "sequenceLength".

To illustrate, suppose the original sequence is a,b,c,d,e and K=3. Then the sliding window will hold instances created from these subsequences: a,b,c,d,e,ab,bc,cd,de,abc,bcd,cde.

Author:
William Cohen

Method Summary
 java.util.Set<java.lang.String> classNameSet()
          Return the set of strings associated with ClassLabels on any of the stored segments.
 int getMaxWindowSize()
          Return the maximum segment length.
 int getSequenceLength()
          Return the length of the original sequence that the segments were derived from.
 java.lang.String getSubpopulationId()
          Return the subpopulationId for the original sequence.
 Example getSubsequenceExample(int start, int end)
          Return the example corresponding to the segment from positions start..end
 Instance getSubsequenceInstance(int start, int end)
          Return the instance corresponding to the segment from positions start...end.
 ClassLabel getSubsequenceLabel(int start, int end)
          Return the class label associated with getSubsequenceExample(start,end).
 int size()
          Number of instances stored.
 

Method Detail

getSequenceLength

int getSequenceLength()
Return the length of the original sequence that the segments were derived from.


getMaxWindowSize

int getMaxWindowSize()
Return the maximum segment length.


size

int size()
Number of instances stored.


getSubsequenceExample

Example getSubsequenceExample(int start,
                              int end)
Return the example corresponding to the segment from positions start..end


getSubsequenceLabel

ClassLabel getSubsequenceLabel(int start,
                               int end)
Return the class label associated with getSubsequenceExample(start,end).


getSubsequenceInstance

Instance getSubsequenceInstance(int start,
                                int end)
Return the instance corresponding to the segment from positions start...end.


classNameSet

java.util.Set<java.lang.String> classNameSet()
Return the set of strings associated with ClassLabels on any of the stored segments.


getSubpopulationId

java.lang.String getSubpopulationId()
Return the subpopulationId for the original sequence.

Specified by:
getSubpopulationId in interface HasSubpopulationId