PredictorParsnip {fmeffects}R Documentation

PredictorParsnip

Description

This task specializes Predictor for parsnip models. The model is assumed to be a model_fit object.

It is recommended to use makePredictor() for construction of Predictor objects.

Super class

fmeffects::Predictor -> PredictorParsnip

Methods

Public methods


Method new()

Create a new PredictorParsnip object.

Usage
PredictorParsnip$new(model, data, target)
Arguments
model

model_fit object.

data

The data used for computing FMEs, must be data.frame or data.table.

target

A string specifying the target variable.


Method predict()

Predicts on an observation "newdata".

Usage
PredictorParsnip$predict(newdata)
Arguments
newdata

The feature vector for which the target should be predicted.


Method clone()

The objects of this class are cloneable with this method.

Usage
PredictorParsnip$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package fmeffects version 0.1.2 Index]