predict.imptree {imptree} | R Documentation |
Prediction of imptree
objects
## S3 method for class 'imptree' predict(object, data, dominance = c("strong", "max"), utility = 0.65, ...) ## S3 method for class 'evaluation_imptree' print(x, ...)
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 |
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:
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 any j != i with u(C_i) < u(C_j)
Interval dominance criterion. For the IDM it coincides with the strong dominance criterion. Here a state C_i is dominated if there exists any j != i with u(C_i) < l(C_j)
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.
Paul Fink Paul.Fink@stat.uni-muenchen.de
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)