predict.CLRmodel: Predict Method for CLR

Description Usage Arguments Value See Also Examples

View source: R/method_clr.R

Description

This function predicts values based upon a model trained by clr.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'CLRmodel'
predict(
  object,
  newdata,
  probability = getOption("utiml.use.probs", TRUE),
  ...,
  cores = getOption("utiml.cores", 1),
  seed = getOption("utiml.seed", NA)
)

Arguments

object

Object of class 'CLRmodel'.

newdata

An object containing the new input data. This must be a matrix, data.frame or a mldr object.

probability

Logical indicating whether class probabilities should be returned. (Default: getOption("utiml.use.probs", TRUE))

...

Others arguments passed to the base algorithm prediction for all subproblems.

cores

The number of cores to parallelize the training. Values higher than 1 require the parallel package. (Default: options("utiml.cores", 1))

seed

An optional integer used to set the seed. This is useful when the method is run in parallel. (Default: options("utiml.seed", NA))

Value

An object of type mlresult, based on the parameter probability.

See Also

Binary Relevance (BR)

Examples

1
2
model <- clr(toyml, "RANDOM")
pred <- predict(model, toyml)

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