use of org.knime.base.node.stats.testing.levene.LeveneTestStatistics in project knime-core by knime.
the class TwoSampleTTestNodeModel method execute.
/**
* {@inheritDoc}
*/
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {
Map<Group, String> groups = new LinkedHashMap<Group, String>();
groups.put(Group.GroupX, m_settings.getGroupOne());
groups.put(Group.GroupY, m_settings.getGroupTwo());
Grouping grouping = new StringValueGrouping(m_settings.getGroupingColumn(), groups);
DataTableSpec spec = inData[0].getSpec();
FilterResult filter = m_settings.getTestColumns().applyTo(spec);
TwoSampleTTest test = new TwoSampleTTest(filter.getIncludes(), grouping, m_settings.getConfidenceIntervalProb());
TwoSampleTTestStatistics[] result = test.execute(inData[0], exec);
LeveneTest leveneTest = new LeveneTest(filter.getIncludes(), m_settings.getGroupingColumn(), Arrays.asList(new String[] { m_settings.getGroupOne(), m_settings.getGroupTwo() }), getGroupSummaryStats(result));
LeveneTestStatistics[] leveneResult = leveneTest.execute(inData[0], exec);
leveneResult[0].getTTestCells();
m_descStats = getDescriptiveStatisticsTable(result, exec);
m_leveneStats = getLeveneStatistices(leveneResult, exec);
m_stats = getTestStatisticsTable(result, exec);
return new BufferedDataTable[] { m_stats, m_leveneStats, m_descStats };
}
use of org.knime.base.node.stats.testing.levene.LeveneTestStatistics in project knime-core by knime.
the class OneWayANOVANodeModel method execute.
/**
* {@inheritDoc}
*/
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {
DataTableSpec spec = inData[0].getSpec();
FilterResult filter = m_settings.getTestColumns().applyTo(spec);
ExecutionMonitor groupExec = exec.createSubProgress(0.3);
ExecutionMonitor oneWayAnovaExec = exec.createSubProgress(0.3);
// runs twice, maybe
ExecutionMonitor leveneExec = exec.createSubProgress(0.4);
exec.setMessage("Determining groups");
List<String> groups = getGroups(inData[0], groupExec);
groupExec.setProgress(1.0);
exec.setMessage("Computing ANOVA");
OneWayANOVA test = new OneWayANOVA(filter.getIncludes(), m_settings.getGroupingColumn(), groups, m_settings.getConfidenceIntervalProb());
OneWayANOVAStatistics[] result = test.execute(inData[0], oneWayAnovaExec);
oneWayAnovaExec.setProgress(1.0);
exec.setMessage("Computing Levene");
LeveneTest leveneTest = new LeveneTest(filter.getIncludes(), m_settings.getGroupingColumn(), groups, getGroupSummaryStats(result));
LeveneTestStatistics[] leveneResult = leveneTest.execute(inData[0], leveneExec);
leveneResult[0].getTTestCells();
leveneExec.setProgress(1.0);
exec.setMessage("Assembling output");
m_descStats = getDescriptiveStatisticsTable(result, exec);
m_leveneStats = getLeveneStatistices(leveneResult, exec);
m_stats = getTestStatisticsTable(result, exec);
return new BufferedDataTable[] { m_stats, m_leveneStats, m_descStats };
}
Aggregations