ngroups.predx: Numbers of observation in the actual and predicted classes.

View source: R/numbers.R

ngroups.predxR Documentation

Numbers of observation in the actual and predicted classes.

Description

Computes the number of observation in the outcome an predicted classes.

Usage

## S3 method for class 'predx'
ngroups(x, ...)

## S3 method for class 'caretx'
ngroups(x, newdata = NULL, ...)

Arguments

x

a caretx model or predx prediction object.

...

extra arguments, currently none.

newdata

optional test data set.

Details

For regression, NULL is returned with a warning.

Value

a data frame with the class names and numbers of observations in the outcome and fitted classes (predx) or a list of such data frames for the training, resample (CV) and test datasets.


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