public class Experiments extends Object
Modifier and Type | Field and Description |
---|---|
protected int[] |
maxY |
protected int[] |
px
px[x] holds the number of times the history x appeared in training data
|
protected 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 [numTrainingDatums][2] and holds the x and y (word and tag index) for each training sample.
|
int |
xSize |
int |
ySize |
Constructor and Description |
---|
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: <data><xSize>xSize</xSize><ySize>ySize</ySize>
x1 y1
x2 y2
..
|
Modifier and Type | Method and Description |
---|---|
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()
Returns the number of training data items.
|
protected int[][] vArray
protected int[] px
protected int[] py
protected int[] maxY
protected int[][] pxy
public int xSize
public int ySize
public double[][] values
public Experiments()
public Experiments(int[][] vArray)
public Experiments(int[][] vArray, int[] maxYs)
public Experiments(int[][] vArray, int ySize)
public Experiments(String filename)
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)