split.caretx: Split predictions by an explanatory factor.

View source: R/caretx_oop.R

split.caretxR Documentation

Split predictions by an explanatory factor.

Description

The split() method for the caretx class generates predictions for the training, resample (CV) and, optionally, test data set and splits them by the levels of an explanatory factor present in the training data.

Usage

## S3 method for class 'caretx'
split(x, f, drop = FALSE, newdata = NULL, ...)

Arguments

x

a caretx object.

f

a splitting factor, in quoted or unquoted form.

drop

logical, should unused levels of the splitting factor f be dropped?

newdata

an optional data frame with the test data.

...

extra arguments, currently none.

Details

This method may be used to investigate quality of prediction in a particular subset or subsets of the data set. The method returns a plain list of predx objects, whose properties can be further explored with the specific summary.predx and plot.predx methods.

Value

a plain list of predx objects.


PiotrTymoszuk/caretExtra documentation built on Oct. 15, 2023, 10:03 p.m.