edu.stanford.nlp.maxent.iis
Class Experiments

java.lang.Object
  |
  +--edu.stanford.nlp.maxent.iis.Experiments
Direct Known Subclasses:
TaggerExperiments

public class Experiments
extends Object

This class represents the training samples. It can return statistics of them, for example the frequency of each x or y in the training data.


Field Summary
protected  int[] maxY
           
protected static int number
          number is the number of Experiments
protected  int[] px
          px[x] holds the number of times the history x appeared in training data py[y] holds the number of times the outcome y appeared in training data
protected static int[][] pxy
          pxy[x][y]=# times (x,y) occurred in training
protected  int[] py
           
static int[][] vArray
          vArray has dimensions [numTraining][2] and holds the x and y for each training sample.
static int xSize
           
static int ySize
           
 
Constructor Summary
Experiments()
           
Experiments(int[][] vArray)
           
Experiments(int[][] vArray, int ySize)
           
Experiments(String filename)
          The filename has format: xSizeySize x1 y1 x2 y2 ..
 
Method Summary
 void add(Experiment m)
           
 int[] get(int index)
           
 int getMaxY(int x)
           
 int getNumber()
           
static void main(String[] args)
           
 void print()
           
 void print(PrintFile pf)
           
 void ptield()
           
 void ptield(int ySize)
          When we want a pregiven number of classes.
 double ptieldX(int x)
           
static double ptieldXY(int x, int y)
           
 double ptieldY(int y)
           
 void read(String filename)
           
 void save(String filename)
           
 void setMaxY(int[] maxY)
           
static int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vArray

public static int[][] vArray
vArray has dimensions [numTraining][2] and holds the x and y for each training sample.


number

protected static int number
number is the number of Experiments


px

protected int[] px
px[x] holds the number of times the history x appeared in training data py[y] holds the number of times the outcome y appeared in training data


py

protected int[] py

maxY

protected int[] maxY

pxy

protected static int[][] pxy
pxy[x][y]=# times (x,y) occurred in training


xSize

public static int xSize

ySize

public static int ySize
Constructor Detail

Experiments

public Experiments()

Experiments

public Experiments(int[][] vArray)

Experiments

public Experiments(int[][] vArray,
                   int ySize)

Experiments

public Experiments(String filename)
The filename has format: xSizeySize x1 y1 x2 y2 .. ..

Method Detail

getNumber

public int getNumber()

add

public void add(Experiment m)

ptield

public void ptield()

setMaxY

public void setMaxY(int[] maxY)

getMaxY

public int getMaxY(int x)

ptield

public void ptield(int ySize)
When we want a pregiven number of classes.


ptieldX

public double ptieldX(int x)

ptieldY

public double ptieldY(int y)

ptieldXY

public static double ptieldXY(int x,
                              int y)

get

public int[] get(int index)

size

public static int size()

print

public void print()

print

public void print(PrintFile pf)

save

public void save(String filename)

read

public void read(String filename)

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)


Stanford NLP Group