|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.multi.MultiDatasetIndex
public class MultiDatasetIndex
An inverted index, mapping features to examples which contain the features.
Constructor Summary | |
---|---|
MultiDatasetIndex()
|
|
MultiDatasetIndex(MultiDataset data)
Construct an index of a dataset. |
Method Summary | |
---|---|
void |
addMultiExample(MultiExample e)
Add a single example to the index. |
double |
averageFeaturesPerExample()
Average number of non-zero feature values in examples. |
protected java.util.List<MultiExample> |
classIndex(java.lang.String label)
|
protected java.util.List<MultiExample> |
featureIndex(Feature feature)
|
java.util.Iterator<Feature> |
featureIterator()
Iterate over all features indexed. |
MultiExample |
getMultiExample(Feature f,
int i)
Get i-th example containing feature f. |
MultiExample |
getMultiExample(java.lang.String label,
int i)
Get i-th example with given class label. |
java.util.Iterator<MultiExample> |
getNeighbors(Instance instance)
Get all examples with a feature in common with the given instance. |
static void |
main(java.lang.String[] args)
|
int |
numberOfFeatures()
Number of features indexed. |
int |
size(Feature f)
Number of examples containing non-zero values for feature f. |
int |
size(java.lang.String label)
Number of examples with the given class label. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiDatasetIndex()
public MultiDatasetIndex(MultiDataset data)
Method Detail |
---|
public void addMultiExample(MultiExample e)
public java.util.Iterator<Feature> featureIterator()
public int size(Feature f)
public int size(java.lang.String label)
public MultiExample getMultiExample(Feature f, int i)
public MultiExample getMultiExample(java.lang.String label, int i)
public java.util.Iterator<MultiExample> getNeighbors(Instance instance)
public int numberOfFeatures()
public double averageFeaturesPerExample()
protected java.util.List<MultiExample> featureIndex(Feature feature)
protected java.util.List<MultiExample> classIndex(java.lang.String label)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |