predict.imptree: Classification with Imprecise Probabilities

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Prediction of imptree objects

Usage

1
2
3
4
5
6
## 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 imptree. See details.

data

Data.frame containing observations to be predicted. If NULL the observations in the training set of "object" are employed.

dominance

Dominace criterion to be applied when predicting classes. This may either be "strong" (default) or "max". See details.

utility

Utility for the utility based accuracy measure for a vacuous prediction result (default: 0.65).

...

Additional arguments for data. May be "weights", "subset", "na.action", any further are discarded.

x

an object of class evaluation_imptree

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 any j != i with u(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 any j != i with u(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

  • nObs: Number of observations

  • deter: Determinacy

  • nObsIndet: Number of observations with indeterminate prediction

  • indetSize: Average number of classes when predicting indeterminate (NA when no indeterminate observation)

  • acc_single: Single-set accuracy (NA when no determinate observation)

  • acc_set: Set-accuracy (NA when no indeterminate observation)

  • acc_disc: Discounted-accuracy

  • acc_util: Utility based (discounted) accuracy

The printing function returns the evaluation_imptree object invisibly.

Author(s)

Paul Fink Paul.Fink@stat.uni-muenchen.de

See Also

imptree, node_imptree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

imptree documentation built on May 1, 2019, 8:18 p.m.