use of org.knime.core.node.defaultnodesettings.SettingsModelString in project knime-core by knime.
the class DecisionTreeLearnerNodeModel method validateSettings.
/**
* This method validates the settings. That is:
* <ul>
* <li>The number of the class column must be an integer > 0</li>
* <li>The positive value <code>DataCell</code> must not be null</li>
* </ul>
* {@inheritDoc}
*
* @see NodeModel#validateSettings(NodeSettingsRO)
*/
@Override
protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
SettingsModelString classifyColumn = m_classifyColumn.createCloneWithValidatedValue(settings);
if (classifyColumn.getStringValue() == null || classifyColumn.getStringValue().equals("")) {
throw new InvalidSettingsException("Classification column not set.");
}
m_averageSplitpoint.validateSettings(settings);
m_binaryNominalSplitMode.validateSettings(settings);
m_pruningMethod.validateSettings(settings);
m_numberRecordsStoredForView.validateSettings(settings);
// m_pruningConfidenceThreshold.validateSettings(settings);
m_minNumberRecordsPerNode.validateSettings(settings);
m_splitQualityMeasureType.validateSettings(settings);
m_maxNumNominalsForCompleteComputation.validateSettings(settings);
m_parallelProcessing.validateSettings(settings);
// added in v2.5.3, bug 3124
if (settings.containsKey(KEY_FILTER_NOMINAL_VALUES_FROM_PARENT)) {
m_filterNominalValuesFromParent.validateSettings(settings);
}
/* Added with 2.5 to avoid running out of heap space with columns
* that have too many nominal values. */
if (settings.containsKey(KEY_SKIP_COLUMNS)) {
m_skipColumns.validateSettings(settings);
}
}
Aggregations