DALEX (version 0.3.0)

yhat: Wrapper over the predict function

Description

This function is just a wrapper over the predict function. It sets different default parameters for models from different classes, like for classification random Forest is forces the output to be probabilities not classes itself.

Usage

yhat(X.model, newdata, ...)

# S3 method for lm yhat(X.model, newdata, ...)

# S3 method for randomForest yhat(X.model, newdata, ...)

# S3 method for svm yhat(X.model, newdata, ...)

# S3 method for glm yhat(X.model, newdata, ...)

# S3 method for ranger yhat(X.model, newdata, ...)

# S3 method for default yhat(X.model, newdata, ...)

Arguments

X.model

object - a model to be explained

newdata

data.frame or matrix - observations for prediction

...

other parameters that will be passed to the predict function

Value

An numeric matrix of predictions