|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.maxent.Experiments
public class Experiments
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 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: |
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 |
read(String filename)
|
void |
save(String filename)
|
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 |
---|
protected int[][] vArray
protected int[] px
protected int[] py
protected int[] maxY
protected static int[][] pxy
public static int xSize
public static int ySize
public double[][] values
Constructor Detail |
---|
public Experiments()
public Experiments(int[][] vArray)
vArray
- public Experiments(int[][] vArray, int[] maxYs)
vArray
- public Experiments(int[][] vArray, int ySize)
public Experiments(String filename)
Method Detail |
---|
public Index<IntPair> createIndex()
public void add(Experiments m)
public final void ptilde()
public void setMaxY(int[] maxY)
public int numY(int x)
public void ptilde(int ySize)
public double ptildeX(int x)
public double ptildeY(int y)
public double ptildeXY(int x, int y)
public int[] get(int index)
public int size()
public int getNumber()
public void print()
public void print(PrintFile pf)
public void save(String filename)
public void read(String filename)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |