use of edu.cmu.tetrad.data.CellTable in project tetrad by cmu-phil.
the class TestCellTable method setUp.
public final void setUp() {
this.table = new CellTable(dims);
// // Add data to table.
List<Node> variables = new LinkedList<>();
variables.add(new DiscreteVariable("X1", 2));
variables.add(new DiscreteVariable("X2", 2));
variables.add(new DiscreteVariable("X3", 2));
variables.add(new DiscreteVariable("X4", 2));
DataSet dataSet = new ColtDataSet(data.length, variables);
for (int i = 0; i < data.length; i++) {
for (int j = 0; j < data[0].length; j++) {
dataSet.setInt(i, j, data[i][j]);
}
}
int[] indices = new int[] { 0, 1, 2, 3 };
this.table.addToTable(dataSet, indices);
}
Aggregations