use of org.knime.base.node.mine.treeensemble2.node.predictor.TreeEnsemblePredictorConfiguration in project knime-core by knime.
the class RandomForestRegressionLearnerNodeModel method createOutOfBagPredictor.
/**
* @param ensembleSpec
* @param ensembleModel
* @param inSpec
* @return
* @throws InvalidSettingsException
*/
private TreeEnsemblePredictor createOutOfBagPredictor(final TreeEnsembleModelPortObjectSpec ensembleSpec, final TreeEnsembleModelPortObject ensembleModel, final DataTableSpec inSpec) throws InvalidSettingsException {
String targetColumn = m_configuration.getTargetColumn();
TreeEnsemblePredictorConfiguration ooBConfig = new TreeEnsemblePredictorConfiguration(true, targetColumn);
String append = targetColumn + " (Out-of-bag)";
ooBConfig.setPredictionColumnName(append);
ooBConfig.setAppendPredictionConfidence(true);
ooBConfig.setAppendClassConfidences(true);
ooBConfig.setAppendModelCount(true);
return new TreeEnsemblePredictor(ensembleSpec, ensembleModel, inSpec, ooBConfig);
}
use of org.knime.base.node.mine.treeensemble2.node.predictor.TreeEnsemblePredictorConfiguration in project knime-core by knime.
the class RandomForestRegressionPredictorNodeModel method validateSettings.
/**
* {@inheritDoc}
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
TreeEnsemblePredictorConfiguration config = new TreeEnsemblePredictorConfiguration(true, "");
config.loadInModel(settings);
}
use of org.knime.base.node.mine.treeensemble2.node.predictor.TreeEnsemblePredictorConfiguration in project knime-core by knime.
the class GradientBoostingClassificationPredictorNodeModel method loadValidatedSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {
TreeEnsemblePredictorConfiguration config = new TreeEnsemblePredictorConfiguration(true, "");
config.loadInModel(settings);
m_configuration = config;
}
use of org.knime.base.node.mine.treeensemble2.node.predictor.TreeEnsemblePredictorConfiguration in project knime-core by knime.
the class GradientBoostingClassificationPredictorNodeModel method validateSettings.
/**
* {@inheritDoc}
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
TreeEnsemblePredictorConfiguration config = new TreeEnsemblePredictorConfiguration(true, "");
config.loadInModel(settings);
}
use of org.knime.base.node.mine.treeensemble2.node.predictor.TreeEnsemblePredictorConfiguration in project knime-core by knime.
the class GradientBoostingPMMLPredictorNodeModel method loadValidatedSettingsFrom.
/**
* {@inheritDoc}
*/
@Override
protected void loadValidatedSettingsFrom(final NodeSettingsRO settings) throws InvalidSettingsException {
TreeEnsemblePredictorConfiguration config = new TreeEnsemblePredictorConfiguration(m_isRegression, "");
config.loadInModel(settings);
m_configuration = config;
}
Aggregations