Search in sources :

Example 1 with TreeNominalColumnData

use of org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData in project knime-core by knime.

the class TreeNominalColumnDataTest method createPCATestData.

private static Pair<TreeNominalColumnData, TreeTargetNominalColumnData> createPCATestData(final TreeEnsembleLearnerConfiguration config) {
    DataColumnSpec colSpec = new DataColumnSpecCreator("test-col", StringCell.TYPE).createSpec();
    final String[] attVals = new String[] { "A", "B", "C", "D", "E" };
    final String[] classes = new String[] { "T1", "T2", "T3" };
    TreeNominalColumnDataCreator colCreator = new TreeNominalColumnDataCreator(colSpec);
    DataColumnSpecCreator specCreator = new DataColumnSpecCreator("target-col", StringCell.TYPE);
    specCreator.setDomain(new DataColumnDomainCreator(Arrays.stream(classes).distinct().map(s -> new StringCell(s)).toArray(i -> new StringCell[i])).createDomain());
    DataColumnSpec targetSpec = specCreator.createSpec();
    TreeTargetColumnDataCreator targetCreator = new TreeTargetNominalColumnDataCreator(targetSpec);
    long rowKeyCounter = 0;
    final int[][] classDistributions = new int[][] { { 40, 10, 10 }, { 10, 40, 10 }, { 20, 30, 10 }, { 20, 15, 25 }, { 10, 5, 45 } };
    for (int i = 0; i < attVals.length; i++) {
        for (int j = 0; j < classes.length; j++) {
            for (int k = 0; k < classDistributions[i][j]; k++) {
                RowKey key = RowKey.createRowKey(rowKeyCounter++);
                colCreator.add(key, new StringCell(attVals[i]));
                targetCreator.add(key, new StringCell(classes[j]));
            }
        }
    }
    final TreeNominalColumnData testColData = colCreator.createColumnData(0, config);
    testColData.getMetaData().setAttributeIndex(0);
    return Pair.create(testColData, (TreeTargetNominalColumnData) targetCreator.createColumnData());
}
Also used : Arrays(java.util.Arrays) RandomData(org.apache.commons.math.random.RandomData) RowKey(org.knime.core.data.RowKey) IsInstanceOf.instanceOf(org.hamcrest.core.IsInstanceOf.instanceOf) InvalidSettingsException(org.knime.core.node.InvalidSettingsException) SplitCriterion(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration.SplitCriterion) DataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.DataMemberships) TreeNodeNominalCondition(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalCondition) Pair(org.knime.core.util.Pair) Assert.assertThat(org.junit.Assert.assertThat) ColumnSamplingMode(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration.ColumnSamplingMode) TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration) DataColumnSpec(org.knime.core.data.DataColumnSpec) DataColumnDomainCreator(org.knime.core.data.DataColumnDomainCreator) DataColumnSpecCreator(org.knime.core.data.DataColumnSpecCreator) Assert.assertArrayEquals(org.junit.Assert.assertArrayEquals) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) SetLogic(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalBinaryCondition.SetLogic) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate) BigInteger(java.math.BigInteger) TreeNodeNominalBinaryCondition(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalBinaryCondition) SplitCandidate(org.knime.base.node.mine.treeensemble2.learner.SplitCandidate) TreeType(org.knime.base.node.mine.treeensemble2.model.AbstractTreeEnsembleModel.TreeType) Assert.assertNotNull(org.junit.Assert.assertNotNull) IDataIndexManager(org.knime.base.node.mine.treeensemble2.data.memberships.IDataIndexManager) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) DoubleCell(org.knime.core.data.def.DoubleCell) DefaultDataIndexManager(org.knime.base.node.mine.treeensemble2.data.memberships.DefaultDataIndexManager) Assert.assertNull(org.junit.Assert.assertNull) Assert.assertFalse(org.junit.Assert.assertFalse) StringCell(org.knime.core.data.def.StringCell) BitSet(java.util.BitSet) MissingValueHandling(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration.MissingValueHandling) Assert.assertEquals(org.junit.Assert.assertEquals) DataColumnSpecCreator(org.knime.core.data.DataColumnSpecCreator) RowKey(org.knime.core.data.RowKey) DataColumnDomainCreator(org.knime.core.data.DataColumnDomainCreator) DataColumnSpec(org.knime.core.data.DataColumnSpec) StringCell(org.knime.core.data.def.StringCell)

Example 2 with TreeNominalColumnData

use of org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData in project knime-core by knime.

the class TreeNominalColumnDataTest method testCalcBestSplitClassificationMultiWay.

/**
 * Tests the method
 * {@link TreeNominalColumnData#calcBestSplitClassification(DataMemberships, ClassificationPriors, TreeTargetNominalColumnData, RandomData)}
 * using multiway splits
 *
 * @throws Exception
 */
@Test
public void testCalcBestSplitClassificationMultiWay() throws Exception {
    TreeEnsembleLearnerConfiguration config = createConfig(false);
    config.setUseBinaryNominalSplits(false);
    Pair<TreeNominalColumnData, TreeTargetNominalColumnData> tennisData = tennisData(config);
    TreeNominalColumnData columnData = tennisData.getFirst();
    TreeTargetNominalColumnData targetData = tennisData.getSecond();
    TreeData treeData = createTreeData(tennisData);
    assertEquals(SplitCriterion.Gini, config.getSplitCriterion());
    double[] rowWeights = new double[SMALL_COLUMN_DATA.length];
    Arrays.fill(rowWeights, 1.0);
    IDataIndexManager indexManager = new DefaultDataIndexManager(treeData);
    DataMemberships dataMemberships = new RootDataMemberships(rowWeights, treeData, indexManager);
    ClassificationPriors priors = targetData.getDistribution(rowWeights, config);
    SplitCandidate splitCandidate = columnData.calcBestSplitClassification(dataMemberships, priors, targetData, null);
    assertNotNull(splitCandidate);
    assertThat(splitCandidate, instanceOf(NominalMultiwaySplitCandidate.class));
    assertFalse(splitCandidate.canColumnBeSplitFurther());
    // manually via libre office calc
    assertEquals(0.0744897959, splitCandidate.getGainValue(), 0.00001);
    NominalMultiwaySplitCandidate multiWaySplitCandidate = (NominalMultiwaySplitCandidate) splitCandidate;
    TreeNodeNominalCondition[] childConditions = multiWaySplitCandidate.getChildConditions();
    assertEquals(3, childConditions.length);
    assertEquals("S", childConditions[0].getValue());
    assertEquals("O", childConditions[1].getValue());
    assertEquals("R", childConditions[2].getValue());
}
Also used : TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) TreeNodeNominalCondition(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalCondition) IDataIndexManager(org.knime.base.node.mine.treeensemble2.data.memberships.IDataIndexManager) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate) SplitCandidate(org.knime.base.node.mine.treeensemble2.learner.SplitCandidate) DefaultDataIndexManager(org.knime.base.node.mine.treeensemble2.data.memberships.DefaultDataIndexManager) DataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.DataMemberships) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) Test(org.junit.Test)

Example 3 with TreeNominalColumnData

use of org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData in project knime-core by knime.

the class TreeNominalColumnDataTest method testCalcBestSplitRegressionBinaryXGBoostMissingValueHandling.

/**
 * Tests the XGBoost missing value handling in case of a regression with binary splits.
 *
 * @throws Exception
 */
@Test
public void testCalcBestSplitRegressionBinaryXGBoostMissingValueHandling() throws Exception {
    final TreeEnsembleLearnerConfiguration config = createConfig(true);
    config.setMissingValueHandling(MissingValueHandling.XGBoost);
    final TestDataGenerator dataGen = new TestDataGenerator(config);
    final String noMissingCSV = "A, A, A, B, B, B, B, C, C";
    final String noMissingsTarget = "1, 2, 2, 7, 6, 5, 2, 3, 1";
    TreeNominalColumnData dataCol = dataGen.createNominalAttributeColumn(noMissingCSV, "noMissings", 0);
    TreeTargetNumericColumnData targetCol = TestDataGenerator.createNumericTargetColumn(noMissingsTarget);
    double[] weights = new double[9];
    Arrays.fill(weights, 1.0);
    int[] indices = new int[9];
    for (int i = 0; i < indices.length; i++) {
        indices[i] = i;
    }
    final RandomData rd = config.createRandomData();
    DataMemberships dataMemberships = new MockDataColMem(indices, indices, weights);
    // first test the case that there are no missing values during training (we still need to provide a missing value direction for prediction)
    SplitCandidate split = dataCol.calcBestSplitRegression(dataMemberships, targetCol.getPriors(weights, config), targetCol, rd);
    assertNotNull("SplitCandidate may not be null", split);
    assertThat(split, instanceOf(NominalBinarySplitCandidate.class));
    assertEquals("Wrong gain.", 22.755555, split.getGainValue(), 1e-5);
    assertTrue("No missing values in dataCol therefore the missedRows BitSet must be empty.", split.getMissedRows().isEmpty());
    NominalBinarySplitCandidate nomSplit = (NominalBinarySplitCandidate) split;
    TreeNodeNominalBinaryCondition[] conditions = nomSplit.getChildConditions();
    assertEquals("Binary split candidate must have two children.", 2, conditions.length);
    final String[] values = new String[] { "A", "C" };
    assertArrayEquals("Wrong values in split condition.", values, conditions[0].getValues());
    assertArrayEquals("Wrong values in split condition.", values, conditions[1].getValues());
    assertFalse("Missings should go with majority", conditions[0].acceptsMissings());
    assertTrue("Missings should go with majority", conditions[1].acceptsMissings());
    assertEquals("Wrong set logic.", SetLogic.IS_NOT_IN, conditions[0].getSetLogic());
    assertEquals("Wrong set logic.", SetLogic.IS_IN, conditions[1].getSetLogic());
    // test the case that there are missing values during training
    final String missingCSV = "A, A, A, B, B, B, B, C, C, ?";
    final String missingTarget = "1, 2, 2, 7, 6, 5, 2, 3, 1, 8";
    dataCol = dataGen.createNominalAttributeColumn(missingCSV, "missing", 0);
    targetCol = TestDataGenerator.createNumericTargetColumn(missingTarget);
    weights = new double[10];
    Arrays.fill(weights, 1.0);
    indices = new int[10];
    for (int i = 0; i < indices.length; i++) {
        indices[i] = i;
    }
    dataMemberships = new MockDataColMem(indices, indices, weights);
    split = dataCol.calcBestSplitRegression(dataMemberships, targetCol.getPriors(weights, config), targetCol, rd);
    assertNotNull("SplitCandidate may not be null.", split);
    assertThat(split, instanceOf(NominalBinarySplitCandidate.class));
    assertEquals("Wrong gain.", 36.1, split.getGainValue(), 1e-5);
    assertTrue("Conditions should handle missing values therefore the missedRows BitSet must be empty.", split.getMissedRows().isEmpty());
    nomSplit = (NominalBinarySplitCandidate) split;
    conditions = nomSplit.getChildConditions();
    assertEquals("Binary split candidate must have two children.", 2, conditions.length);
    assertArrayEquals("Wrong values in split condition.", values, conditions[0].getValues());
    assertArrayEquals("Wrong values in split condition.", values, conditions[1].getValues());
    assertTrue("Missings should go with B (because there target values are similar)", conditions[0].acceptsMissings());
    assertFalse("Missings should go with B (because there target values are similar)", conditions[1].acceptsMissings());
    assertEquals("Wrong set logic.", SetLogic.IS_NOT_IN, conditions[0].getSetLogic());
    assertEquals("Wrong set logic.", SetLogic.IS_IN, conditions[1].getSetLogic());
}
Also used : TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration) RandomData(org.apache.commons.math.random.RandomData) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate) SplitCandidate(org.knime.base.node.mine.treeensemble2.learner.SplitCandidate) DataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.DataMemberships) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) TreeNodeNominalBinaryCondition(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalBinaryCondition) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate) Test(org.junit.Test)

Example 4 with TreeNominalColumnData

use of org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData in project knime-core by knime.

the class TreeNominalColumnDataTest method testCalcBestSplitRegressionMultiwayXGBoostMissingValueHandling.

/**
 * This method tests the XGBoost missing value handling in case of a regression task and multiway splits.
 *
 * @throws Exception
 */
@Test
public void testCalcBestSplitRegressionMultiwayXGBoostMissingValueHandling() throws Exception {
    final TreeEnsembleLearnerConfiguration config = createConfig(true);
    config.setMissingValueHandling(MissingValueHandling.XGBoost);
    config.setUseBinaryNominalSplits(false);
    final TestDataGenerator dataGen = new TestDataGenerator(config);
    final String noMissingCSV = "A, A, A, B, B, B, B, C, C";
    final String noMissingsTarget = "1, 2, 2, 7, 6, 5, 2, 3, 1";
    TreeNominalColumnData dataCol = dataGen.createNominalAttributeColumn(noMissingCSV, "noMissings", 0);
    TreeTargetNumericColumnData targetCol = TestDataGenerator.createNumericTargetColumn(noMissingsTarget);
    double[] weights = new double[9];
    Arrays.fill(weights, 1.0);
    int[] indices = new int[9];
    for (int i = 0; i < indices.length; i++) {
        indices[i] = i;
    }
    final RandomData rd = config.createRandomData();
    DataMemberships dataMemberships = new MockDataColMem(indices, indices, weights);
    // first test the case that there are no missing values during training (we still need to provide a missing value direction for prediction)
    SplitCandidate split = dataCol.calcBestSplitRegression(dataMemberships, targetCol.getPriors(weights, config), targetCol, rd);
    assertNotNull("SplitCandidate may not be null", split);
    assertThat(split, instanceOf(NominalMultiwaySplitCandidate.class));
    assertEquals("Wrong gain.", 22.888888, split.getGainValue(), 1e-5);
    assertTrue("No missing values in dataCol therefore the missedRows BitSet must be empty.", split.getMissedRows().isEmpty());
    NominalMultiwaySplitCandidate nomSplit = (NominalMultiwaySplitCandidate) split;
    TreeNodeNominalCondition[] conditions = nomSplit.getChildConditions();
    assertEquals("3 nominal values therefore there must be 3 children.", 3, conditions.length);
    assertEquals("Wrong value.", "A", conditions[0].getValue());
    assertEquals("Wrong value.", "B", conditions[1].getValue());
    assertEquals("Wrong value.", "C", conditions[2].getValue());
    assertFalse("Missings should go with majority", conditions[0].acceptsMissings());
    assertTrue("Missings should go with majority", conditions[1].acceptsMissings());
    assertFalse("Missings should go with majority", conditions[2].acceptsMissings());
    // test the case that there are missing values during training
    final String missingCSV = "A, A, A, B, B, B, B, C, C, ?";
    final String missingTarget = "1, 2, 2, 7, 6, 5, 2, 3, 1, 8";
    dataCol = dataGen.createNominalAttributeColumn(missingCSV, "missing", 0);
    targetCol = TestDataGenerator.createNumericTargetColumn(missingTarget);
    weights = new double[10];
    Arrays.fill(weights, 1.0);
    indices = new int[10];
    for (int i = 0; i < indices.length; i++) {
        indices[i] = i;
    }
    dataMemberships = new MockDataColMem(indices, indices, weights);
    split = dataCol.calcBestSplitRegression(dataMemberships, targetCol.getPriors(weights, config), targetCol, rd);
    assertNotNull("SplitCandidate may not be null.", split);
    assertThat(split, instanceOf(NominalMultiwaySplitCandidate.class));
    // assertEquals("Wrong gain.", 36.233333333, split.getGainValue(), 1e-5);
    assertTrue("Conditions should handle missing values therefore the missedRows BitSet must be empty.", split.getMissedRows().isEmpty());
    nomSplit = (NominalMultiwaySplitCandidate) split;
    conditions = nomSplit.getChildConditions();
    assertEquals("3 values (not counting missing values) therefore there must be 3 children.", 3, conditions.length);
    assertEquals("Wrong value.", "A", conditions[0].getValue());
    assertEquals("Wrong value.", "B", conditions[1].getValue());
    assertEquals("Wrong value.", "C", conditions[2].getValue());
    assertFalse("Missings should go with majority", conditions[0].acceptsMissings());
    assertTrue("Missings should go with majority", conditions[1].acceptsMissings());
    assertFalse("Missings should go with majority", conditions[2].acceptsMissings());
}
Also used : TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration) RandomData(org.apache.commons.math.random.RandomData) TreeNodeNominalCondition(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalCondition) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate) SplitCandidate(org.knime.base.node.mine.treeensemble2.learner.SplitCandidate) DataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.DataMemberships) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) Test(org.junit.Test)

Example 5 with TreeNominalColumnData

use of org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData in project knime-core by knime.

the class TreeNominalColumnDataTest method testCalcBestSplitCassificationBinaryTwoClassXGBoostMissingValue.

/**
 * Tests the XGBoost Missing value handling in case of a two class problem <br>
 * currently not tested because missing value handling will probably be implemented differently.
 *
 * @throws Exception
 */
// @Test
public void testCalcBestSplitCassificationBinaryTwoClassXGBoostMissingValue() throws Exception {
    final TreeEnsembleLearnerConfiguration config = createConfig(false);
    config.setMissingValueHandling(MissingValueHandling.XGBoost);
    final TestDataGenerator dataGen = new TestDataGenerator(config);
    // check correct behavior if no missing values are encountered during split search
    Pair<TreeNominalColumnData, TreeTargetNominalColumnData> twoClassTennisData = twoClassTennisData(config);
    TreeData treeData = dataGen.createTreeData(twoClassTennisData.getSecond(), twoClassTennisData.getFirst());
    IDataIndexManager indexManager = new DefaultDataIndexManager(treeData);
    double[] rowWeights = new double[TWO_CLASS_INDICES.length];
    Arrays.fill(rowWeights, 1.0);
    // DataMemberships dataMemberships = TestDataGenerator.createMockDataMemberships(TWO_CLASS_INDICES.length);
    DataMemberships dataMemberships = new RootDataMemberships(rowWeights, treeData, indexManager);
    TreeTargetNominalColumnData targetData = twoClassTennisData.getSecond();
    TreeNominalColumnData columnData = twoClassTennisData.getFirst();
    ClassificationPriors priors = targetData.getDistribution(rowWeights, config);
    RandomData rd = TestDataGenerator.createRandomData();
    SplitCandidate splitCandidate = columnData.calcBestSplitClassification(dataMemberships, priors, targetData, rd);
    assertNotNull(splitCandidate);
    assertThat(splitCandidate, instanceOf(NominalBinarySplitCandidate.class));
    NominalBinarySplitCandidate binarySplitCandidate = (NominalBinarySplitCandidate) splitCandidate;
    TreeNodeNominalBinaryCondition[] childConditions = binarySplitCandidate.getChildConditions();
    assertEquals(2, childConditions.length);
    assertArrayEquals(new String[] { "R" }, childConditions[0].getValues());
    assertArrayEquals(new String[] { "R" }, childConditions[1].getValues());
    assertEquals(SetLogic.IS_NOT_IN, childConditions[0].getSetLogic());
    assertEquals(SetLogic.IS_IN, childConditions[1].getSetLogic());
    // check if missing values go left
    assertTrue(childConditions[0].acceptsMissings());
    assertFalse(childConditions[1].acceptsMissings());
    // check correct behavior if missing values are encountered during split search
    String dataContainingMissingsCSV = "S,?,O,R,S,R,S,O,O,?";
    columnData = dataGen.createNominalAttributeColumn(dataContainingMissingsCSV, "column containing missing values", 0);
    treeData = dataGen.createTreeData(targetData, columnData);
    indexManager = new DefaultDataIndexManager(treeData);
    dataMemberships = new RootDataMemberships(rowWeights, treeData, indexManager);
    splitCandidate = columnData.calcBestSplitClassification(dataMemberships, priors, targetData, null);
    assertNotNull(splitCandidate);
    binarySplitCandidate = (NominalBinarySplitCandidate) splitCandidate;
    assertEquals("Gain was not as expected", 0.08, binarySplitCandidate.getGainValue(), 1e-8);
    childConditions = binarySplitCandidate.getChildConditions();
    String[] conditionValues = new String[] { "O", "?" };
    assertArrayEquals("Values in nominal condition did not match", conditionValues, childConditions[0].getValues());
    assertArrayEquals("Values in nominal condition did not match", conditionValues, childConditions[1].getValues());
    assertEquals("Wrong set logic.", SetLogic.IS_NOT_IN, childConditions[0].getSetLogic());
    assertEquals("Wrong set logic.", SetLogic.IS_IN, childConditions[1].getSetLogic());
    assertFalse("Missig values are not sent to the correct child.", childConditions[0].acceptsMissings());
    assertTrue("Missig values are not sent to the correct child.", childConditions[1].acceptsMissings());
}
Also used : TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) RandomData(org.apache.commons.math.random.RandomData) IDataIndexManager(org.knime.base.node.mine.treeensemble2.data.memberships.IDataIndexManager) NominalMultiwaySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate) SplitCandidate(org.knime.base.node.mine.treeensemble2.learner.SplitCandidate) DefaultDataIndexManager(org.knime.base.node.mine.treeensemble2.data.memberships.DefaultDataIndexManager) DataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.DataMemberships) RootDataMemberships(org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships) TreeNodeNominalBinaryCondition(org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalBinaryCondition) NominalBinarySplitCandidate(org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate)

Aggregations

TreeEnsembleLearnerConfiguration (org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration)19 Test (org.junit.Test)18 DataMemberships (org.knime.base.node.mine.treeensemble2.data.memberships.DataMemberships)15 RootDataMemberships (org.knime.base.node.mine.treeensemble2.data.memberships.RootDataMemberships)15 NominalBinarySplitCandidate (org.knime.base.node.mine.treeensemble2.learner.NominalBinarySplitCandidate)13 NominalMultiwaySplitCandidate (org.knime.base.node.mine.treeensemble2.learner.NominalMultiwaySplitCandidate)13 SplitCandidate (org.knime.base.node.mine.treeensemble2.learner.SplitCandidate)13 TreeNodeNominalBinaryCondition (org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalBinaryCondition)10 DefaultDataIndexManager (org.knime.base.node.mine.treeensemble2.data.memberships.DefaultDataIndexManager)9 IDataIndexManager (org.knime.base.node.mine.treeensemble2.data.memberships.IDataIndexManager)8 RandomData (org.apache.commons.math.random.RandomData)6 TreeNodeNominalCondition (org.knime.base.node.mine.treeensemble2.model.TreeNodeNominalCondition)6 TestDataGenerator (org.knime.base.node.mine.treeensemble2.data.TestDataGenerator)4 TreeNominalColumnData (org.knime.base.node.mine.treeensemble2.data.TreeNominalColumnData)4 BitSet (java.util.BitSet)3 PMMLCompoundPredicate (org.knime.base.node.mine.decisiontree2.PMMLCompoundPredicate)2 PMMLPredicate (org.knime.base.node.mine.decisiontree2.PMMLPredicate)2 PMMLSimplePredicate (org.knime.base.node.mine.decisiontree2.PMMLSimplePredicate)2 PredictorRecord (org.knime.base.node.mine.treeensemble2.data.PredictorRecord)2 BigInteger (java.math.BigInteger)1