Learn R Programming

utiml (version 0.1.4)

predict.CCmodel: Predict Method for Classifier Chains

Description

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

Usage

# S3 method for CCmodel
predict(object, newdata,
  probability = getOption("utiml.use.probs", TRUE), ..., cores = NULL,
  seed = getOption("utiml.seed", NA))

Arguments

object

Object of class 'CCmodel'.

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

Ignored because this method does not support multi-core.

seed

An optional integer used to set the seed. (Default: options("utiml.seed", NA))

Value

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

See Also

Classifier Chains (CC)

Examples

Run this code
# NOT RUN {
model <- cc(toyml, "RANDOM")
pred <- predict(model, toyml)

# }
# NOT RUN {
# Predict SVM bipartitions
pred <- predict(model, toyml, prob = FALSE)

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

Run the code above in your browser using DataLab