use of org.knime.core.node.util.filter.NameFilterConfiguration.FilterResult in project knime-core by knime.
the class NameFilterConfigurationTest method testShuffledWithSomeMissingAndSomeExtra_Enforce.
@Test
public void testShuffledWithSomeMissingAndSomeExtra_Enforce() throws Exception {
NameFilterConfiguration conf = createConfiguration(EnforceOption.EnforceExclusion);
FilterResult applyTo = conf.applyTo(new String[] { "N1", "E1", "I3", "I2", "N2", "N3" });
Assert.assertArrayEquals(applyTo.getIncludes(), new String[] { "N1", "I3", "I2", "N2", "N3" });
Assert.assertArrayEquals(applyTo.getExcludes(), new String[] { "E1" });
Assert.assertArrayEquals(applyTo.getRemovedFromIncludes(), new String[] { "I1" });
Assert.assertArrayEquals(applyTo.getRemovedFromExcludes(), new String[] { "E2" });
}
use of org.knime.core.node.util.filter.NameFilterConfiguration.FilterResult in project knime-core by knime.
the class NameFilterConfigurationTest method testSomeMissing.
private void testSomeMissing(final NameFilterConfiguration conf) {
FilterResult applyTo = conf.applyTo(new String[] { "I1", "I3", "E1" });
Assert.assertArrayEquals(applyTo.getIncludes(), new String[] { "I1", "I3" });
Assert.assertArrayEquals(applyTo.getExcludes(), new String[] { "E1" });
Assert.assertArrayEquals(applyTo.getRemovedFromIncludes(), new String[] { "I2" });
Assert.assertArrayEquals(applyTo.getRemovedFromExcludes(), new String[] { "E2" });
}
use of org.knime.core.node.util.filter.NameFilterConfiguration.FilterResult in project knime-core by knime.
the class NameFilterConfigurationTest method testGoodCaseAllAvailable.
private void testGoodCaseAllAvailable(final NameFilterConfiguration conf) {
FilterResult applyTo = conf.applyTo(new String[] { "I1", "I2", "I3", "E1", "E2" });
Assert.assertArrayEquals(applyTo.getIncludes(), m_defIncludes);
Assert.assertArrayEquals(applyTo.getExcludes(), m_defExcludes);
Assert.assertArrayEquals(applyTo.getRemovedFromIncludes(), new String[0]);
Assert.assertArrayEquals(applyTo.getRemovedFromExcludes(), new String[0]);
}
use of org.knime.core.node.util.filter.NameFilterConfiguration.FilterResult 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