About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Last updated: Feb 11, 2025
Linear regression is a common statistical technique for
summarizing data and making predictions by fitting a straight line or surface that minimizes the
discrepancies between predicted and actual output values.
Example
node = stream.create("regression", "My node")
# "Fields" tab
node.setPropertyValue("custom_fields", True)
node.setPropertyValue("target", "Age")
node.setPropertyValue("inputs", ["Na", "K"])
node.setPropertyValue("partition", "Test")
node.setPropertyValue("use_weight", True)
node.setPropertyValue("weight_field", "Drug")
# "Model" tab
node.setPropertyValue("use_model_name", True)
node.setPropertyValue("model_name", "Regression Age")
node.setPropertyValue("use_partitioned_data", True)
node.setPropertyValue("method", "Stepwise")
node.setPropertyValue("include_constant", False)
# "Expert" tab
node.setPropertyValue("mode", "Expert")
node.setPropertyValue("complete_records", False)
node.setPropertyValue("tolerance", "1.0E-3")
# "Stepping..." section
node.setPropertyValue("stepping_method", "Probability")
node.setPropertyValue("probability_entry", 0.77)
node.setPropertyValue("probability_removal", 0.88)
node.setPropertyValue("F_value_entry", 7.0)
node.setPropertyValue("F_value_removal", 8.0)
# "Output..." section
node.setPropertyValue("model_fit", True)
node.setPropertyValue("r_squared_change", True)
node.setPropertyValue("selection_criteria", True)
node.setPropertyValue("descriptives", True)
node.setPropertyValue("p_correlations", True)
node.setPropertyValue("collinearity_diagnostics", True)
node.setPropertyValue("confidence_interval", True)
node.setPropertyValue("covariance_matrix", True)
node.setPropertyValue("durbin_watson", True)
Properties |
Values | Property description |
---|---|---|
|
field | Regression models require a single target field and one or more input fields. A weight field can also be specified. See the topic Common modeling node properties for more information. |
|
|
|
|
flag | |
|
flag | |
|
field | |
|
|
|
|
flag | |
|
|
Use double quotes for arguments. |
|
|
: use probability of F
: use F value |
|
number | |
|
number | |
|
number | |
|
number | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
flag | |
|
boolean | Statistics for the residuals (or the differences between predicted values and actual values). |
Was the topic helpful?
0/1000