|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.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 Dataset
public void addUnlabeled(Instance instance)
SemiSupervisedActions
addUnlabeled
in interface SemiSupervisedActions
public java.util.Iterator<Instance> iteratorOverUnlabeled()
SemiSupervisedActions
iteratorOverUnlabeled
in interface SemiSupervisedActions
public int sizeUnlabeled()
SemiSupervisedActions
sizeUnlabeled
in interface SemiSupervisedActions
public boolean hasUnlabeled()
SemiSupervisedActions
hasUnlabeled
in interface SemiSupervisedActions
public FeatureFactory getFeatureFactory()
Dataset
getFeatureFactory
in interface Dataset
public void add(Example example)
add(Example, boolean)
add
in interface Dataset
example
- The Example that you want to add to the dataset.public void add(Example example, boolean compress)
add
in interface Dataset
example
- 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 Dataset
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 Viewer toGUI()
toGUI
in interface Visible
public Dataset.Split split(Splitter<Example> splitter)
Dataset
split
in interface Dataset
public 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 |