use of org.knime.core.node.BufferedDataContainer in project knime-core by knime.
the class OneSampleTTestStatistics method getTTestTable.
/**
* Get the test result of the t-test, for the assumption of equal
* variance and the assumption of unequal variances.
* @param exec the execution context
* @return the t-test results
*/
public BufferedDataTable getTTestTable(final ExecutionContext exec) {
DataTableSpec outSpec = getTableSpec();
BufferedDataContainer cont = exec.createDataContainer(outSpec);
int r = 0;
for (List<DataCell> cells : getTTestCells()) {
cont.addRowToTable(new DefaultRow(RowKey.createRowKey(r), cells));
r++;
}
cont.close();
BufferedDataTable outTable = cont.getTable();
return outTable;
}
use of org.knime.core.node.BufferedDataContainer in project knime-core by knime.
the class OneSampleTTestStatistics method getDescStatsTable.
/**
* Get descriptive statistics
* @param exec
* @return the descriptive statistics for each column test column
*/
public BufferedDataTable getDescStatsTable(final ExecutionContext exec) {
DataTableSpec outSpec = getDescStatsSpec();
BufferedDataContainer cont = exec.createDataContainer(outSpec);
int r = 0;
for (List<DataCell> cells : getDescStatsCells()) {
cont.addRowToTable(new DefaultRow(RowKey.createRowKey(r), cells));
r++;
}
cont.close();
BufferedDataTable outTable = cont.getTable();
return outTable;
}
use of org.knime.core.node.BufferedDataContainer in project knime-core by knime.
the class PairedTTestNodeModel method getDescriptiveStatisticsTable.
/**
* Get table with descriptive statistics
* @param result test statistic
* @param exec the exection context
* @return a combined table of the test statistic
*/
private BufferedDataTable getDescriptiveStatisticsTable(final PairedTTestStatistics[] result, final ExecutionContext exec) {
BufferedDataContainer cont = exec.createDataContainer(PairedTTestStatistics.getDescStatsSpec());
int r = 0;
for (int i = 0; i < result.length; i++) {
for (List<DataCell> cells : result[i].getDescStatsCells()) {
cont.addRowToTable(new DefaultRow(RowKey.createRowKey(r), cells));
r++;
}
}
cont.close();
return cont.getTable();
}
use of org.knime.core.node.BufferedDataContainer in project knime-core by knime.
the class PairedTTestNodeModel method getTestStatisticsTable.
/**
* Get table with test statistics
* @param result test statistic
* @param exec the exection context
* @return a combined table of the test statistic
*/
private BufferedDataTable getTestStatisticsTable(final PairedTTestStatistics[] result, final ExecutionContext exec) {
BufferedDataContainer cont = exec.createDataContainer(PairedTTestStatistics.getTableSpec());
int r = 0;
for (int i = 0; i < result.length; i++) {
for (List<DataCell> cells : result[i].getTTestCells()) {
cont.addRowToTable(new DefaultRow(RowKey.createRowKey(r), cells));
r++;
}
}
cont.close();
return cont.getTable();
}
use of org.knime.core.node.BufferedDataContainer in project knime-core by knime.
the class TwoSampleTTestNodeModel method getLeveneStatistices.
/**
* Get the table with the Levene-Test statistics
* @param leveneResult the Levene-Test results
* @param exec the execution context
* @return the table with the Levene-Test statistics
*/
private BufferedDataTable getLeveneStatistices(final LeveneTestStatistics[] leveneResult, final ExecutionContext exec) {
BufferedDataContainer cont = exec.createDataContainer(LeveneTestStatistics.getTableSpec());
int r = 0;
for (int i = 0; i < leveneResult.length; i++) {
for (List<DataCell> cells : leveneResult[i].getTTestCells()) {
cont.addRowToTable(new DefaultRow(RowKey.createRowKey(r), cells));
r++;
}
}
cont.close();
return cont.getTable();
}
Aggregations