getProb: Extract the probabilities (confidence) from a model; the...

Description Usage Arguments Value See Also

View source: R/OOP_util.R

Description

This is a utility function to simplify and standardize access to model probabilities. The situation is a bit fiddly because not all models return probabilities (e.g. kknn), and those that do are not all in the same format (e.g. fnn.* returns only a single vector of probabilities for the most likely class). This function will return the same structure regardless of model type encountered.

Also note that this function is only useful for categorical data (isCat returns TRUE).

Usage

1
getProb(model)

Arguments

model

the model from which to recover the probability table

Value

a matrix of probabilities in which columns are labelled with the class names

See Also

isCat, and isCont.


henkelstone/NPEL.Classification documentation built on May 17, 2019, 3:42 p.m.