Java Reference
In-Depth Information
Table 9-17
Returns the root mean sum of squared errors of
Returns proportional reduction in the variability of the
target associated with the predicted target values.
Listing 9-14 shows the code that builds the appraisal_model ,
computes test metrics named appraisal_test_metrics , and then applies
the model that outputs the APPRAISAL_APPLY_OUTPUT table
with the appraisal value predictions. The input method in lines 27 to 38
shows the creation and saving of input objects for model build. Simi-
lar to classification settings, regression settings require specification
of the target attribute name. Line 36 sets the appraisal value attribute
as the target attribute. Execution of the build task is the same as for
classification, as shown in lines 69 to 71. After successful execution of
the build task, the test metrics task is used to compute the regression
test metrics. Section 9.4.4 introduced the test task for classification.
Similarly, the RegressionTestTask can be used to compute Regression-
TestMetrics using the model and test data as input.
In contrast, JDM also defines a TestMetricsTask that takes the
apply output data computed using the test data as input instead of
the model. This approach may be useful for data miners who want to
keep the apply output results on test data for some other reasons,
such as to compute additional tests to visualize the results.
Lines 74 to 89 show application of the appraisal_model on the
APPLY_OUTPUT dataset. Lines 90 to 101 show the execution of the
RegressionTestMetricsTask that takes the appraisal_test_apply_output
physical dataset object. The actual and predicted target value col-
umns are the inputs that are used to produce the appraisal_test_
metrics object. Lines 104 to 109 show the execution of the apply task
that produces the APPRAISAL_APPLY_OUTPUT data with the tar-
get predictions. Apply using either a dataset for batch scoring or a
record for real-time scoring is similar to that of classification. Lines
127 to 139 show the retrieval of the regression model and the regres-
sion test metrics from the DME. The regression model also has con-
tents, such as model signature, model details, model version, and
model metadata. Using the get methods of RegressionTestMetrics ,
users can retrieve the various types of prediction error measures
Search WWH ::

Custom Search