Java Reference
In-Depth Information
Table 9-15
Classification apply - related interfaces
Javax.datamining.task.apply package
An ApplySettings object captures a specification that describes the output
of an apply task.
An ApplyTask object captures the task of applying a mining model to data
that matches the model signature.
A DataSetApplyTask object captures the task of applying a mining model
to a dataset with multiple records.
Javax.datamining.supervised.classification package
A ClassificationApplySettings object prescribes the output of an apply
task specific to a classification model.
ClassificationApplyContent enumerates the types of value to appear in the
apply output of a classification model.
The predicted category content is the predicted value of the target
attribute. In our example, it can be the values Attriter or Non-attriter .
The probability content provides the probability associated with the
model's predictions for a given target class value. The cost content is
the cost associated with the model's predictions based on the speci-
fied cost matrix. The node id is specific to decision tree models,
where it shows the node that was used for the prediction. Using this
node id, applications can retrieve the node details, such as rule, asso-
ciated with the prediction.
Listing 9-12 extends the CustomerAttrition example class to show
model apply to predict attrite values for customers in the
CUSTOMERS_APPLY_DATA. Lines 9 to 10 show the creation of the
physical dataset object that represents the input apply data. Lines
12 to 15 show the creation of the empty classification apply settings
object using the object factory create method. Lines 16 to 23 show
how to use the ClassificationApplySettings.mapTopPrediction method to
specify the apply output contents with the top prediction details. The
ClassificationApplySettings provides four types of map methods that
applications can choose to describe the apply output data. The map-
TopPrediction method is used when the application is mainly inter-
ested in the prediction value with the highest probability. Using the
ClassificationApplyContent enumeration, a user can choose the type of
content desired in the apply output table.
Search WWH ::

Custom Search