Get the possible predict.types a CPO is able to handle.

The concept of a predict.type originates from predict.WrappedModel, which allows the estimation of different aspects of a prediction. This is, currently:


A best estimate of the actual target value


An estimate of probabilities of different target values


An estimate of the target value, together with an estimate of the standard error of this first estimation

A Target Operation CPO is able to change the type of a Task, but it can also enhance the type of predictions that a Learner can make for it. Thus a CPO that converts a binary classification into a regression task can use a regression learner to not only predict the “response” class, but also the estimated probability (“prob”) distribution over the two classes. For this, the CPO declares

  1. what predict.types a Learner, when attached to it, can provide, and

  2. what predict.type the Learner, in each case, must be capable of.

This information is provided in the form of a named character, where the names are the provided predict type capabilities, and the values are the predict type that the underlying Learner must provide for this.

The CPO converting classification to regression mentioned above would thus have the predict.type of:

c(response = "response", prob = "response")

Another example would be a CPO that converts a multiclass classification problem into an ordinary classification problem, but uses the “prob” prediction of the underlying learner to make both the “response” and “prob” predictions. It would have the predict.type of:

c(response = "prob", prob = "prob")

If this second CPO is attached to a Learner that does not have the “prob” property (see LearnerProperties), an error is given.

CPOs that are not Target Operating always have the predict.type of:

c(response = "response", prob = "prob", se = "se")


# S3 method for CPOTrained



The cpo.


[character]. A named character that maps potential predict types that a CPO may provide to the required predict type of an underlying learner.

See also