Java Reference
In-Depth Information
Table 9-16
(continued)
mapByRank(
ClassificationApplyContent content,
String[] destPhysAttrNameArray,
boolean fromTop)
Used to specify prediction rank based apply contents for the
apply task. The number of ranks and their order depends on the
size of the
destPhysAttrNameArray
and
fromTop
boolean
value. For example, when a user calls the following method the
apply task will compute the top two predictions and populate
the columns
Rank_1
and
Rank_2
with the prediction values.
A user can call this method multiple times with different apply
contents to obtain additional information.
mapByRank(ClassificationApplyContent.predicted-
Category, new String[] { “Rank_1”, “Rank_2”
}, true)
mapByCategory(
ClassificationApplyContent content,
Object categoryValue,
String destinationAttrName)
Used to specify prediction category, i.e., target value, apply
contents for the apply task. A user can obtain the category set
from the model using the
ClassificationModel.getCategory-
Set()
method and can call this method for each target value. For
example, when a user calls the following methods, the apply
task computes the probabilities associated with the target values
Attriter
and
Non-attriter
and populates the probability values
in the specified columns i.e., Attriter_probability and
NonAttriter_Probability.
mapByCategory(ClassificationApplyContent.
probability,“Yes”, “Yes_Probability”);
mapByCategory(ClassificationApplyContent.
probability,“No”, “No_Probability”);
mapPredictions(
ClassificationApplyContent content,
String baseDestPhysAttrName)
Used to specify all possible predictions for the apply task. When
this method is used, the apply output data will have apply con-
tents for all possible target values. The base attribute name
specified by the user is used to generate column names in the
apply output data. For example, when a user calls the following
methods where the input model has two possible predicted cate-
gories i.e.,
{ Attriter, Non-attriter }, it creates
apply output
data that has columns
PredictedVlaue_1, PredictedVlaue_2,
Probability_1, Probability_2.
The column
Probability_1
will
have the probability value associated with the predicted value in
column
PredictedValue_1.
Similarly, column
Probability_2
will have the probability value associated with the predicted
value in column
PredictedValue_2.
mapPredictions(ClassificationApplyContent.predicted-
Category, “PredictedValue”);
mapPredictions(ClassificationApplyContent.probability,
“Probability”);
Search WWH ::
Custom Search