predictionSet {fabPrediction}R Documentation

Wrapper to obtain a prediction set for categorical data

Description

This function computes a prediction set from a number of methods.

Usage

predictionSet(
  Y,
  method = "FAB",
  alpha = 0.15,
  gamma = rep(1, length(Y)),
  category_names = 1:length(Y)
)

Arguments

Y

Observed data vector

method

Choice of prediction method. Options include FAB, direct, Bayes.

alpha

Prediction mis-coverage rate

gamma

Dirichlet prior concentration for FAB/Bayes methods

category_names

Category names (optional)

Value

pred object containing prediction set and interval coverage

Examples


# obtain example categorical data
set.seed(1)
prob = rdirichlet(50:1)
y = rmultinom(1,15,prob)

fab.set = predictionSet(y,
  method = "FAB",
  gamma = c(50:1))
plot(fab.set)


[Package fabPrediction version 1.0.4 Index]