Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.nlp.maxent
Class Experiments

    java.lang.Object
      edu.stanford.nlp.maxent.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.

Author:
  Kristina Toutanova

Field Summary
`protected int[]` | `maxY`
`protected int[]` | `px` px[x] holds the number of times the history x appeared in training data
`protected static int[][]` | `pxy` pxy[x][y]=# times (x,y) occurred in training
`protected int[]` | `py` py[y] holds the number of times the outcome y appeared in training data
`double[][]` | `values` The value of classification y for x.
`protected 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)` If this constructor is used, the maximum possible class overall is found and all classes are assumed possible for all instances
`Experiments(int[][] vArray, int ySize)`
`Experiments(int[][] vArray, int[] maxYs)` The number of possible classes for each instance is contained in the array maxYs then the possible classes for x are from 0 to maxYs[x]-1
`Experiments(String filename)` The filename has format: xSize ySize x1 y1 x2 y2 ..

Method Summary
`void` | `add(Experiments m)`
`Index<IntPair>` | `createIndex()`
`int[]` | `get(int index)`
`int` | `getNumber()`
`int` | `numY(int x)`
`void` | `print()`
`void` | `print(PrintFile pf)`
`void` | `ptilde()`
`void` | `ptilde(int ySize)` When we want a pre-given number of classes.
`double` | `ptildeX(int x)`
`double` | `ptildeXY(int x, int y)`
`double` | `ptildeY(int y)`
`void` | `setMaxY(int[] maxY)`
`int` | `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### vArray

    protected int[][] vArray

  vArray has dimensions [numTraining][2] and holds the x and y for each training sample. Its length is the number of data points.

### px

    protected int[] px

  px[x] holds the number of times the history x appeared in training data

### py

    protected int[] py

  py[y] holds the number of times the outcome y appeared in training data

### 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

### values

    public double[][] values

  The value of classification y for x. Used for ranking.

Constructor Detail

### Experiments

    public Experiments()

### Experiments

    public Experiments(int[][] vArray)

  If this constructor is used, the maximum possible class overall is found and all classes are assumed possible for all instances

### Experiments

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

  The number of possible classes for each instance is contained in the array maxYs then the possible classes for x are from 0 to maxYs[x]-1

### Experiments

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

### Experiments

    public Experiments(String filename)

  The filename has format: xSize ySize x1 y1 x2 y2 .. ..

Method Detail

### createIndex

    public Index<IntPair> createIndex()

### add

    public void add(Experiments m)

### ptilde

    public final void ptilde()

### setMaxY

    public void setMaxY(int[] maxY)

### numY

    public int numY(int x)

### ptilde

    public void ptilde(int ySize)

  When we want a pre-given number of classes.

### ptildeX

    public double ptildeX(int x)

### ptildeY

    public double ptildeY(int y)

### ptildeXY

    public double ptildeXY(int x,
                           int y)

### get

    public int[] get(int index)

### size

    public int size()

### getNumber

    public int getNumber()

### print

    public void print()

### print

    public void print(PrintFile pf)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Stanford NLP Group