derivative: Computes the derivative of a feature

Description Usage Arguments

Description

Computes the derivative of a feature at point or vector x.

Usage

1
2
derivative(x, feature, data, model, predict.fun = function(object,
  newdata) predict(object, newdata = newdata), ...)

Arguments

x

[vector]
A scalar value or vector indicating the point(s) at which the gradient is to be calculated.

feature

[character(1)]
The column name of the data set that refers to the feature for which the derivative will be computed.

data

[logical(1)]
The data set that was used to fit the model.

model

[WrappedModel | any]
A model object. Can be also an object of class WrappedModel.

predict.fun

[function(1)]
The function that should be used to generate predictions from model. The specified prediction function is subject to subsequent numeric differentiation and thus needs to be carefully chosen in order to receive the correct results. This function must have two arguments, object and newdata. The default is the predict method for model. If model is of class WrappedModel, the default tries to use getPredictionProbabilities or getPredictionResponse depending on whether model is a classification or regression problem.

...

Further options passed down to the grad function.


compstat-lmu/ame documentation built on May 13, 2019, 12:53 p.m.