predict.DBRmodel: Predict Method for DBR

Description Usage Arguments Details Value References See Also Examples

View source: R/method_dbr.R

Description

This function predicts values based upon a model trained by dbr. In general this method is a restricted version of predict.BRPmodel using the 'NU' strategy.

Usage

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

Arguments

object

Object of class 'DBRmodel'.

newdata

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

estimative

A matrix containing the bipartition result of other multi-label classification algorithm or an mlresult object with the predictions.

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))

Details

As new feature is possible to use other multi-label classifier to predict the estimate values of each label. To this use the prediction argument to inform a result of other multi-label algorithm.

Value

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

References

Montanes, E., Senge, R., Barranquero, J., Ramon Quevedo, J., Jose Del Coz, J., & Hullermeier, E. (2014). Dependent binary relevance models for multi-label classification. Pattern Recognition, 47(3), 1494-1508.

See Also

Dependent Binary Relevance (DBR)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Predict SVM scores
model <- dbr(toyml)
pred <- predict(model, toyml)

# Passing a specif parameter for SVM predict algorithm
pred <- predict(model, toyml, na.action = na.fail)

# Using other classifier (EBR) to made the labels estimatives
estimative <- predict(ebr(toyml), toyml)
model <- dbr(toyml, estimate.models = FALSE)
pred <- predict(model, toyml, estimative = estimative)

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