multilabel_prediction: Create a mlresult object

Description Usage Arguments Value Examples

View source: R/mlresult.R

Description

Create a mlresult object

Usage

1
2
3
4
5
6
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

1
2
3
4
5
6
7
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)

utiml documentation built on May 31, 2021, 9:09 a.m.