use of org.knime.base.node.mine.treeensemble2.data.TreeTargetColumnData in project knime-core by knime.
the class AbstractColumnSampleTest method createTreeData.
/**
* @return TreeData object for testing purposes
*/
protected static TreeData createTreeData() {
final TestDataGenerator dataGen = new TestDataGenerator(new TreeEnsembleLearnerConfiguration(false));
final TreeAttributeColumnData[] cols = new TreeAttributeColumnData[10];
for (int i = 0; i < TREE_DATA_SIZE; i++) {
if (i % 2 == 0) {
cols[i] = dataGen.createNominalAttributeColumn("a, b", "nom" + i, i);
} else {
cols[i] = dataGen.createNumericAttributeColumn("1, 2", "num1", i);
}
}
TreeTargetColumnData target = TestDataGenerator.createNominalTargetColumn("A, B");
return dataGen.createTreeData(target, cols);
}
Aggregations