0 / 0
Setting algorithm properties

Setting algorithm properties

For the Auto Classifier, Auto Numeric, and Auto Cluster nodes, you can set properties for specific algorithms used by the node by using the general form:

autonode.setKeyedPropertyValue(<algorithm>, <property>, <value>)

For example:

node.setKeyedPropertyValue("neuralnetwork", "method", "MultilayerPerceptron")

Algorithm names for the Auto Classifier node are cart, chaid, quest, c50, logreg, decisionlist, bayesnet, discriminant, svm and knn.

Algorithm names for the Auto Numeric node are cart, chaid, neuralnetwork, genlin, svm, regression, linear and knn.

Algorithm names for the Auto Cluster node are twostep, k-means, and kohonen.

Property names are standard as documented for each algorithm node.

Algorithm properties that contain periods or other punctuation must be wrapped in single quotes. For example:

node.setKeyedPropertyValue("logreg", "tolerance", "1.0E-5")

Multiple values can also be assigned for a property. For example:

node.setKeyedPropertyValue("decisionlist", "search_direction", ["Up", "Down"])

To enable or disable the use of a specific algorithm:

node.setPropertyValue("chaid", True)
Note: In cases where certain algorithm options aren't available in the Auto Classifier node, or when only a single value can be specified rather than a range of values, the same limits apply with scripting as when accessing the node in the standard manner.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more