edu.cmu.minorthird.classify.relational
Class CoreRelationalDataset

java.lang.Object
  extended by edu.cmu.minorthird.classify.BasicDataset
      extended by edu.cmu.minorthird.classify.relational.CoreRelationalDataset
All Implemented Interfaces:
Dataset, Visible, Saveable, java.io.Serializable
Direct Known Subclasses:
RealRelationalDataset

public class CoreRelationalDataset
extends BasicDataset
implements Visible, Saveable, Dataset, java.io.Serializable

A core set of examples for stached graphical learning -- dataset + linksmap.

Author:
Zhenzhen Kou
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.cmu.minorthird.classify.BasicDataset
BasicDataset.SimpleDatasetViewer
 
Nested classes/interfaces inherited from interface edu.cmu.minorthird.classify.Dataset
Dataset.Split
 
Field Summary
protected  SGMFeatureFactory factory
           
protected static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> linksMap
           
 
Fields inherited from class edu.cmu.minorthird.classify.BasicDataset
classNameSet, examples, featureFactory, unlabeledExamples
 
Constructor Summary
CoreRelationalDataset()
           
 
Method Summary
static void addLink(Link link)
          Add a link to the LinksMap of the dataset.
 void addSGM(SGMExample example)
           
 void addSGM(SGMExample example, boolean compress)
          Add an Example to the dataset.
 SGMExample getExampleWithID(java.lang.String id)
           
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> getLinksMap()
           
static void main(java.lang.String[] args)
          Simple test routine
static void setLinksMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> linksMap)
           
 
Methods inherited from class edu.cmu.minorthird.classify.BasicDataset
add, add, addUnlabeled, getExtensionFor, getFeatureFactory, getFormatNames, getSchema, hasUnlabeled, iterator, iteratorOverUnlabeled, restore, saveAs, shallowCopy, shuffle, shuffle, size, sizeUnlabeled, split, toGUI, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.minorthird.util.Saveable
getExtensionFor, getFormatNames, restore, saveAs
 
Methods inherited from interface edu.cmu.minorthird.classify.Dataset
add, add, getFeatureFactory, getSchema, iterator, shallowCopy, shuffle, shuffle, size, split
 
Methods inherited from interface edu.cmu.minorthird.util.gui.Visible
toGUI
 

Field Detail

linksMap

protected static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> linksMap

factory

protected SGMFeatureFactory factory
Constructor Detail

CoreRelationalDataset

public CoreRelationalDataset()
Method Detail

addSGM

public void addSGM(SGMExample example)

addSGM

public void addSGM(SGMExample example,
                   boolean compress)
Add an Example to the dataset.

This method lets the caller specify whether or not to compress the example before adding it to the dataset.

Parameters:
example - The example to add to the dataset
compress - Boolean specifying whether or not to compress the example.

addLink

public static void addLink(Link link)
Add a link to the LinksMap of the dataset.
A link contains 'from', 'to', and 'type' Please note that if the link type is 'left', it means the left ngb of 'from' is 'to'

Parameters:
link - The Link that you want to add to the dataset.

getExampleWithID

public SGMExample getExampleWithID(java.lang.String id)

getLinksMap

public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> getLinksMap()

setLinksMap

public static void setLinksMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.Set<java.lang.String>>> linksMap)

main

public static void main(java.lang.String[] args)
Simple test routine