measurePerformance: Measure Performance

Description Usage Arguments

View source: R/measurePerformance.R

Description

Measures the performance on passed data.

Usage

1
2
3
4
5
6
7
8
measurePerformance(
  object,
  data,
  target = NULL,
  measures,
  local = FALSE,
  predict.fun = NULL
)

Arguments

object

[any]
Either a WrappedModel or a ResampleResult. You can also provide any other trained model (however, this is experimental and you need to provide an appropriate predict.fun).

data

[data.frame]
The data whose features will be permuted in order to measure their importance. If object is of class ResampleResult, you should use the corresponding data on which the whole resampling was performed. In any other case, you might use some independent test data that was not used to fit the model (although you could also use the train data here).

target

[character(1)]
Only needed if object is not of class WrappedModel or ResampleResult. Name of the target feature to be predicted.

measures

[Measure | list of Measure | function | list of function]
Performance measure(s) used to measure the model performance. Can also be a named list of function with signature function(y, pred), where y and pred are vectors containing the true and the predicted values of the target.

local

[logical(1)]
Should the performance (or the feature importance) be computed observation-wise? Note that not all measures support this (e.g. one can not compute the AUC for one observation). The default is FALSE.

predict.fun

[function]
Only needed if object is not of class WrappedModel or ResampleResult. The signature must be function(object, newdata) and the function should always return a vector of predictions. The default NULL internally uses predict(object, newdata = newdata).


giuseppec/featureImportance documentation built on June 1, 2021, 11:04 a.m.