Description Usage Arguments Value Methods (by class) Examples
Convert a matrix prediction in a multi label prediction
1 2 3 4 5 6 7 | as.mlresult(predictions, probability = TRUE, ...)
## Default S3 method:
as.mlresult(predictions, probability = TRUE, ..., threshold = 0.5)
## S3 method for class 'mlresult'
as.mlresult(predictions, probability = TRUE, ...)
|
predictions |
a Matrix or data.frame contained the scores/probabilities values. The columns are the labels and the rows are the examples. |
probability |
A logical value. If |
... |
ignored |
threshold |
A single value between 0 and 1 or a list with threshold values contained one value per label (Default: 0.5). Only used when the predictions are not a mlresult. |
An object of type mlresult
default
: Default mlresult transform method
mlresult
: change the mlresult type
1 2 3 4 5 6 7 8 9 10 | predictions <- matrix(runif(100), ncol = 10)
colnames(predictions) <- paste('label', 1:10, sep='')
# Create a mlresult from a matrix
mlresult <- as.mlresult(predictions)
mlresult <- as.mlresult(predictions, probability = FALSE)
mlresult <- as.mlresult(predictions, probability = FALSE, threshold = 0.6)
# Change the current type of a mlresult
mlresult <- as.mlresult(mlresult, probability = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.