warp.function: Create a warped version of a model fitting function

warp.functionR Documentation

Create a warped version of a model fitting function

Description

Use warp_fitted_model() instead, which provides a more elegant way to create a warped perspective on a model. This function may be omitted in the future, unless it turns out to be instrumental in drop/permute and re-learn techniques that require a trainable model, not a fitted one.

Usage

## S3 method for class ''function''
warp(x, warper, ...)

Arguments

x

A model fitting function such as stats::lm() or randomForest::randomForest

warper

A warper object, for example a pca_warper.

...

Additional arguments to be passed to the model fitting function.

Details

Models fitted using the resulting object currently don't seem to work properly inside function calls that are parallelized with future; at least that's what happens with sperrorest.

Value

A function representing the composition of the learning function F:L\mapsto\hat{f} with the inverse transformation function T^{-1}. In other words, this function first (back)transformed its input data from the transformed space to the original feature space, and then fits a model using these features.

See Also

warp_fitted_model()


alexanderbrenning/wiml documentation built on Sept. 29, 2023, 4:45 a.m.