|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.classify.sequential.InstanceFromSequence
public class InstanceFromSequence
An instance that appears as part of a sequence.
| Field Summary |
|---|
| Fields inherited from interface edu.cmu.minorthird.classify.sequential.SequenceConstants |
|---|
HISTORY_FEATURE, NULL_CLASS_NAME |
| Constructor Summary | |
|---|---|
InstanceFromSequence(Instance instance,
java.lang.String[] previousLabels)
|
|
| Method Summary | |
|---|---|
Instance |
asPlainInstance()
Return the wrapped instance. |
java.util.Iterator<Feature> |
binaryFeatureIterator()
Return an iterator over all binary features. |
java.util.Iterator<Feature> |
featureIterator()
Return an iterator over all features |
static void |
fillHistory(java.lang.String[] history,
ClassLabel[] labels,
int j)
Utility to create history from a sequence of class labels, starting at positive j-1. |
static void |
fillHistory(java.lang.String[] history,
Example[] sequence,
int j)
Utility to create history from a sequence of examples, starting at positive j-1. |
static void |
fillHistory(java.lang.String[] history,
java.lang.String[] labels,
int j)
Utility to create history from a sequence of Strings, starting at positive j-1. |
java.lang.Object |
getSource()
Get the underlying object used that this instance describes |
java.lang.String |
getSubpopulationId()
Get the subpopulation from which this instance was drawn. |
double |
getWeight(Feature f)
Get the weight assigned to a feature in this instance. |
static void |
main(java.lang.String[] argv)
|
java.util.Iterator<Feature> |
numericFeatureIterator()
Return an iterator over all numeric features. |
int |
numFeatures()
Return the number of all the features |
Viewer |
toGUI()
Create a view of this object |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InstanceFromSequence(Instance instance,
java.lang.String[] previousLabels)
instance - - the instance to extendpreviousLabels - - element k is the classLabel of the example
(k+1) positions before this instance in the sequence.| Method Detail |
|---|
public Instance asPlainInstance()
public final java.lang.Object getSource()
Instance
getSource in interface Instancepublic final java.lang.String getSubpopulationId()
Instance
getSubpopulationId in interface HasSubpopulationIdgetSubpopulationId in interface Instancepublic final java.util.Iterator<Feature> numericFeatureIterator()
Instance
numericFeatureIterator in interface Instancepublic final java.util.Iterator<Feature> binaryFeatureIterator()
Instance
binaryFeatureIterator in interface Instancepublic final java.util.Iterator<Feature> featureIterator()
Instance
featureIterator in interface Instancepublic final int numFeatures()
Instance
numFeatures in interface Instancepublic final double getWeight(Feature f)
Instance
getWeight in interface Instancepublic java.lang.String toString()
toString in class java.lang.Objectpublic final Viewer toGUI()
Visible
toGUI in interface Visible
public static void fillHistory(java.lang.String[] history,
Example[] sequence,
int j)
public static void fillHistory(java.lang.String[] history,
ClassLabel[] labels,
int j)
public static void fillHistory(java.lang.String[] history,
java.lang.String[] labels,
int j)
public static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||