predict.imptree {imptree} | R Documentation |
Classification with Imprecise Probabilities
Description
Prediction of imptree
objects
Usage
## S3 method for class 'imptree'
predict(object, data, dominance = c("strong", "max"),
utility = 0.65, ...)
## S3 method for class 'evaluation_imptree'
print(x, ...)
Arguments
object |
An object of class |
data |
Data.frame containing observations to be predicted.
If |
dominance |
Dominace criterion to be applied when predicting
classes. This may either be |
utility |
Utility for the utility based accuracy measure for a vacuous prediction result (default: 0.65). |
... |
Additional arguments for data. May be |
x |
an object of class |
Details
This function carries out the prediction of an imprecise tree.
An existence check on the stored C++ object reference is carried out
at first. If the reference is not valid the original call
for "object"
is printed as error.
There are currently 2 different dominance criteria available:
- max
Maximum frequency criterion. Dominance is decided only by the upper bound of the probability interval, ie. a state
C_i
is dominated if there exists anyj \neq i
withu(C_i) < u(C_j)
- strong
Interval dominance criterion. For the IDM it coincides with the strong dominance criterion. Here a state
C_i
is dominated if there exists anyj \neq i
withu(C_i) < l(C_j)
Value
predict.imptree()
return an object of class
evaluation_imptree
, which is a named list containing
predicted classes, predicted probability distribution and accuracy
evaluation
probintlist |
List of the imprecise probability distributions of the class variable. One matrix per observation in the test data. |
classes |
Predicted class(es) of the observations as boolean matrix |
evaluation |
Result of accuracy evaluation
|
The printing function returns the
evaluation_imptree
object invisibly.
Author(s)
Paul Fink Paul.Fink@stat.uni-muenchen.de
See Also
Examples
data("carEvaluation")
## create a tree with IDM (s=1) to full size
## carEvaluation, leaving the first 10 observations out
ip <- imptree(acceptance~., data = carEvaluation[-(1:10),],
method="IDM", method.param = list(splitmetric = "globalmax", s = 1),
control = list(depth = NULL, minbucket = 1))
## predict the first 10 observations with 'max' dominance
pp <- predict(ip, dominance = "max", data = carEvaluation[(1:10),])
print(pp)
pp$classes ## predicted classes as logical matrix
## predict the first 10 observations with 'strong' dominance and
## use a different level of utility
predict(ip, dominance = "strong", data = carEvaluation[(1:10),],
utility = 0.5)