|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.minorthird.classify.semisupervised.SemiSupervisedDataset
public class SemiSupervisedDataset
| Nested Class Summary | |
|---|---|
static class |
SemiSupervisedDataset.SimpleDatasetViewer
|
| Nested classes/interfaces inherited from interface edu.cmu.minorthird.classify.Dataset |
|---|
Dataset.Split |
| Field Summary | |
|---|---|
protected java.util.Set<java.lang.String> |
classNameSet
|
protected java.util.List<Example> |
examples
|
protected FeatureFactory |
factory
|
protected java.util.List<Instance> |
unlabeledExamples
|
| Constructor Summary | |
|---|---|
SemiSupervisedDataset()
|
|
| Method Summary | |
|---|---|
void |
add(Example example)
Add an example to the dataset. |
void |
add(Example example,
boolean compress)
Add an Example to the dataset. |
void |
addUnlabeled(Instance instance)
Add a new semisupervised example to the dataset. |
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. |
int |
getNumPosExamples()
|
ExampleSchema |
getSchema()
Get the schema associated with the dataset |
boolean |
hasUnlabeled()
Return whether the Dataset contains semisupervised examples available for semi-supervisedd learning. |
java.util.Iterator<Example> |
iterator()
Return an iterator over all examples. |
java.util.Iterator<Instance> |
iteratorOverUnlabeled()
Return an iterator over all the semisupervised examples. |
static void |
main(java.lang.String[] args)
Simple test routine |
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 |
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()
Return the number of semisupervised examples. |
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<Example> examples
protected java.util.List<Instance> unlabeledExamples
protected java.util.Set<java.lang.String> classNameSet
protected FeatureFactory factory
| Constructor Detail |
|---|
public SemiSupervisedDataset()
| Method Detail |
|---|
public ExampleSchema getSchema()
Dataset
getSchema in interface Datasetpublic void addUnlabeled(Instance instance)
SemiSupervisedActions
addUnlabeled in interface SemiSupervisedActionspublic java.util.Iterator<Instance> iteratorOverUnlabeled()
SemiSupervisedActions
iteratorOverUnlabeled in interface SemiSupervisedActionspublic int sizeUnlabeled()
SemiSupervisedActions
sizeUnlabeled in interface SemiSupervisedActionspublic boolean hasUnlabeled()
SemiSupervisedActions
hasUnlabeled in interface SemiSupervisedActionspublic FeatureFactory getFeatureFactory()
Dataset
getFeatureFactory in interface Datasetpublic void add(Example example)
add(Example, boolean)
add in interface Datasetexample - The Example that you want to add to the dataset.
public void add(Example example,
boolean compress)
add in interface Datasetexample - The example to add to the datasetcompress - Boolean specifying whether or not to compress the example.public java.util.Iterator<Example> iterator()
Dataset
iterator in interface Datasetpublic int size()
Dataset
size in interface Datasetpublic void shuffle(java.util.Random r)
Dataset
shuffle in interface Datasetpublic void shuffle()
Dataset
shuffle in interface Datasetpublic Dataset shallowCopy()
Dataset
shallowCopy in interface Datasetpublic java.lang.String[] getFormatNames()
Saveable
getFormatNames in interface Saveablepublic 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 Saveablejava.io.IOException
public java.lang.Object restore(java.io.File file)
throws java.io.IOException
Saveable
restore in interface Saveablejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic Viewer toGUI()
toGUI in interface Visiblepublic Dataset.Split split(Splitter<Example> splitter)
Dataset
split in interface Datasetpublic static void main(java.lang.String[] args)
public int getNumPosExamples()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||