use of org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration in project knime-core by knime.
the class RegressionTreeLearnerNodeDialogPane method saveSettingsTo.
/**
* {@inheritDoc}
*/
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
TreeEnsembleLearnerConfiguration cfg = new TreeEnsembleLearnerConfiguration(true);
m_optionsPanel.saveSettings(cfg);
cfg.save(settings);
}
use of org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration in project knime-core by knime.
the class TreeEnsembleClassificationLearnerNodeDialogPane method saveSettingsTo.
/**
* {@inheritDoc}
*/
@Override
protected void saveSettingsTo(final NodeSettingsWO settings) throws InvalidSettingsException {
TreeEnsembleLearnerConfiguration cfg = new TreeEnsembleLearnerConfiguration(false);
m_attributeSelectionPanel.saveSettings(cfg);
m_treeOptionsPanel.saveSettings(cfg);
m_ensembleOptionsPanel.saveSettings(cfg);
cfg.save(settings);
}
use of org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration in project knime-core by knime.
the class TreeEnsembleRegressionLearnerNodeDialogPane method loadSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs) throws NotConfigurableException {
final DataTableSpec inSpec = specs[0];
TreeEnsembleLearnerConfiguration cfg = new TreeEnsembleLearnerConfiguration(true);
cfg.loadInDialog(settings, inSpec);
m_attributeSelectionPanel.loadSettingsFrom(inSpec, cfg);
m_treeOptionsPanel.loadSettingsFrom(inSpec, cfg);
m_ensembleOptionsPanel.loadSettings(cfg);
}
use of org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration in project knime-core by knime.
the class TreeEnsembleRegressionLearnerNodeModel method loadValidatedSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {
TreeEnsembleLearnerConfiguration config = new TreeEnsembleLearnerConfiguration(true);
config.loadInModel(settings);
m_configuration = config;
}
use of org.knime.base.node.mine.treeensemble2.node.learner.TreeEnsembleLearnerConfiguration 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