Search in sources :

Example 21 with TreeEnsembleLearnerConfiguration

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);
}
Also used : TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble.node.learner.TreeEnsembleLearnerConfiguration) TreeEnsembleModel(org.knime.base.node.mine.treeensemble.model.TreeEnsembleModel) AbstractTreeModel(org.knime.base.node.mine.treeensemble.model.AbstractTreeModel)

Example 22 with TreeEnsembleLearnerConfiguration

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);
}
Also used : TreeEnsembleLearnerConfiguration(org.knime.base.node.mine.treeensemble.node.learner.TreeEnsembleLearnerConfiguration) DataTableSpec(org.knime.core.data.DataTableSpec)

Aggregations

TreeEnsembleLearnerConfiguration (org.knime.base.node.mine.treeensemble.node.learner.TreeEnsembleLearnerConfiguration)22 TreeData (org.knime.base.node.mine.treeensemble.data.TreeData)6 DataTableSpec (org.knime.core.data.DataTableSpec)5 TreeAttributeColumnData (org.knime.base.node.mine.treeensemble.data.TreeAttributeColumnData)4 TreeNodeMembershipController (org.knime.base.node.mine.treeensemble.data.TreeNodeMembershipController)4 TreeTargetNominalColumnData (org.knime.base.node.mine.treeensemble.data.TreeTargetNominalColumnData)3 TreeTargetNumericColumnData (org.knime.base.node.mine.treeensemble.data.TreeTargetNumericColumnData)3 BitSet (java.util.BitSet)2 ClassificationPriors (org.knime.base.node.mine.treeensemble.data.ClassificationPriors)2 RegressionPriors (org.knime.base.node.mine.treeensemble.data.RegressionPriors)2 TreeNodeClassification (org.knime.base.node.mine.treeensemble.model.TreeNodeClassification)2 TreeNodeCondition (org.knime.base.node.mine.treeensemble.model.TreeNodeCondition)2 TreeNodeRegression (org.knime.base.node.mine.treeensemble.model.TreeNodeRegression)2 TreeNodeSignature (org.knime.base.node.mine.treeensemble.model.TreeNodeSignature)2 ColumnSample (org.knime.base.node.mine.treeensemble.sample.column.ColumnSample)2 ColumnSampleStrategy (org.knime.base.node.mine.treeensemble.sample.column.ColumnSampleStrategy)2 RowSample (org.knime.base.node.mine.treeensemble.sample.row.RowSample)2 AbstractTreeModel (org.knime.base.node.mine.treeensemble.model.AbstractTreeModel)1 TreeEnsembleModel (org.knime.base.node.mine.treeensemble.model.TreeEnsembleModel)1 TreeModelClassification (org.knime.base.node.mine.treeensemble.model.TreeModelClassification)1