|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.multi.MultiDataset
public class MultiDataset
A set of examples for learning.
Nested Class Summary | |
---|---|
class |
MultiDataset.MultiSplit
|
static class |
MultiDataset.SimpleDatasetViewer
|
Nested classes/interfaces inherited from interface edu.cmu.minorthird.classify.Dataset |
---|
Dataset.Split |
Field Summary | |
---|---|
protected java.util.Set<java.lang.String>[] |
classNameSets
|
protected java.util.List<MultiExample> |
examples
|
protected FeatureFactory |
factory
|
int |
numPosExamples
|
protected java.util.List<Instance> |
unlabeledExamples
|
Constructor Summary | |
---|---|
MultiDataset()
|
Method Summary | |
---|---|
void |
add(Example example)
Add a new example to the dataset. |
void |
add(Example example,
boolean compress)
Add a new example to the dataset. |
void |
addMulti(MultiExample example)
|
void |
addUnlabeled(Instance instance)
|
MultiDataset |
annotateData()
|
MultiDataset |
annotateData(MultiClassifier multiClassifier)
|
java.lang.String |
getExtensionFor(java.lang.String s)
Recomended extension for the format with the given name. |
FeatureFactory |
getFeatureFactory()
Get the FeatureFactory associated with the dataset |
java.lang.String[] |
getFormatNames()
List of formats in which the object can be saved. |
MultiExample |
getMultiExample(int i)
|
MultiExampleSchema |
getMultiSchema()
|
int |
getNumPosExamples()
|
ExampleSchema |
getSchema()
Overridden, provides ExampleSchema for first dimension |
boolean |
hasUnlabeled()
|
java.util.Iterator<Example> |
iterator()
Return an iterator over all examples. |
java.util.Iterator<Instance> |
iteratorOverUnlabeled()
|
static void |
main(java.lang.String[] args)
Simple test routine |
java.util.Iterator<MultiExample> |
multiIterator()
|
MultiDataset.MultiSplit |
MultiSplit(Splitter<MultiExample> splitter)
|
java.lang.Object |
restore(java.io.File file)
Restore the object from a file. |
void |
saveAs(java.io.File file,
java.lang.String format)
Save this object to the given file, in the given format. |
Dataset[] |
separateDatasets()
|
Dataset |
shallowCopy()
Make a shallow copy of the dataset. |
void |
shuffle()
Randomly re-order the examples. |
void |
shuffle(java.util.Random r)
Randomly re-order the examples. |
int |
size()
Return the number of examples. |
int |
sizeUnlabeled()
|
Dataset.Split |
split(Splitter<Example> splitter)
Partition the dataset as required by the splitter. |
Viewer |
toGUI()
A GUI view of the dataset. |
java.lang.String |
toString()
A string view of the dataset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.List<MultiExample> examples
protected java.util.List<Instance> unlabeledExamples
protected FeatureFactory factory
protected java.util.Set<java.lang.String>[] classNameSets
public int numPosExamples
Constructor Detail |
---|
public MultiDataset()
Method Detail |
---|
public ExampleSchema getSchema()
getSchema
in interface Dataset
public MultiExampleSchema getMultiSchema()
public MultiExample getMultiExample(int i)
public FeatureFactory getFeatureFactory()
Dataset
getFeatureFactory
in interface Dataset
public void addUnlabeled(Instance instance)
public java.util.Iterator<Instance> iteratorOverUnlabeled()
public int sizeUnlabeled()
public boolean hasUnlabeled()
public void add(Example example)
Dataset
add
in interface Dataset
public void add(Example example, boolean compress)
Dataset
add
in interface Dataset
public void addMulti(MultiExample example)
public Dataset[] separateDatasets()
public int getNumPosExamples()
public java.util.Iterator<Example> iterator()
Dataset
iterator
in interface Dataset
public java.util.Iterator<MultiExample> multiIterator()
public int size()
Dataset
size
in interface Dataset
public void shuffle(java.util.Random r)
Dataset
shuffle
in interface Dataset
public void shuffle()
Dataset
shuffle
in interface Dataset
public Dataset shallowCopy()
Dataset
shallowCopy
in interface Dataset
public java.lang.String[] getFormatNames()
Saveable
getFormatNames
in interface Saveable
public java.lang.String getExtensionFor(java.lang.String s)
Saveable
getExtensionFor
in interface Saveable
public void saveAs(java.io.File file, java.lang.String format) throws java.io.IOException
Saveable
saveAs
in interface Saveable
java.io.IOException
public java.lang.Object restore(java.io.File file) throws java.io.IOException
Saveable
restore
in interface Saveable
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public MultiDataset annotateData()
public MultiDataset annotateData(MultiClassifier multiClassifier)
public Viewer toGUI()
toGUI
in interface Visible
public Dataset.Split split(Splitter<Example> splitter)
Dataset
split
in interface Dataset
public MultiDataset.MultiSplit MultiSplit(Splitter<MultiExample> splitter)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |