Learn R Programming

utiml (version 0.1.6)

multilabel_prediction: Create a mlresult object

Description

Create a mlresult object

Usage

multilabel_prediction(
  bipartitions,
  probabilities,
  probability = getOption("utiml.use.probs", TRUE),
  empty.prediction = getOption("utiml.empty.prediction", FALSE)
)

Arguments

bipartitions

The matrix of predictions (bipartition values), only 0 and 1

probabilities

The matrix of probability/confidence of a prediction, between 0..1

probability

A logical value. If TRUE the predicted values are the score between 0 and 1, otherwise the values are bipartition 0 or 1. (Default: getOption("utiml.use.probs", TRUE))

empty.prediction

A logical value. If TRUE the predicted values may contains empty values, otherwise at least one label will be positive for each instance.

Value

An object of type mlresult

Examples

Run this code
# NOT RUN {
probs <- matrix(
 runif(90), ncol=3, dimnames = list(1:30, c("y1", "y2", "y3"))
)
preds <- matrix(
 as.numeric(probs > 0.5), ncol=3, dimnames = list(1:30, c("y1", "y2", "y3"))
)
multilabel_prediction(probs, preds)
# }

Run the code above in your browser using DataLab