Skip to contents

Estimates the nonlinear R2 from a machine learning model compared to a `feature_data` object.

Usage

rsquared(object, ...)

# S4 method for class 'feature_data'
rsquared(
  object,
  model,
  subset = c("all", "test", "train"),
  prep = c("both", "scale", "transform", "none"),
  ...
)

Arguments

object

A `feature_data` object.

...

Additional arguments (currently not used).

model

A fitted model object.

subset

Subset of the `preproc` data set.

prep

Character argument if transformed data ("transform"), scaled data ("scale" ), transformed and scaled data ("both") or original raw data ("none") will be returned.

Value

The coefficient of determination.

Details

Currently only certain Keras models can be used as fitted models.

Methods (by class)

  • rsquared(feature_data): Method for estimating the coefficient of determination of a model for a `feature_data` object.