use of org.knime.base.node.mine.treeensemble.node.learner.TreeEnsembleLearnerConfiguration in project knime-core by knime.
the class TreeEnsembleShrinker method getModel.
/**
* Returns the shrunk tree ensemble model.
*
* Note: If autoShrink() or shrinkTo() have not been called yet the model will contain the same trees as the initial model.
*
* @return The tree ensemble model
*/
public TreeEnsembleModel getModel() {
// Build a model based on the meta data of our initial model and the currently selected trees
TreeEnsembleLearnerConfiguration config = new TreeEnsembleLearnerConfiguration(false);
config.setSaveTargetDistributionInNodes(true);
return new TreeEnsembleModel(config, m_initialEnsemble.getMetaData(), m_currentTrees.toArray(new AbstractTreeModel[m_currentTrees.size()]), TreeType.Ordinary);
}
use of org.knime.base.node.mine.treeensemble.node.learner.TreeEnsembleLearnerConfiguration in project knime-core by knime.
the class RandomForestClassificationLearnerNodeDialogPane method loadSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs) throws NotConfigurableException {
final DataTableSpec inSpec = specs[0];
TreeEnsembleLearnerConfiguration cfg = new TreeEnsembleLearnerConfiguration(false);
cfg.loadInDialog(settings, inSpec);
m_optionPanel.loadSettingsFrom(inSpec, cfg);
}
Aggregations