Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

e.scal

Function to calculate e- or softmax scaled membership values


Description

Calculates the e- or softmax scaled membership values of an argmax based classification rule.

Usage

e.scal(x, k = 1, tc = NULL)

Arguments

x

matrix of membership values

k

parameter for e-scaling (1 for softmax)

tc

vector of true classes (required if k has to be optimized)

Details

For any membership vector y exp(y*k) / sum(exp(y*k) is calculated. If k=1, the classical softmax scaling is used. If the true classes are given, k is optimized so that the apparent error rate is minimized.

Value

A list containing elements

sv

Scaled values

k

Optimal k

Author(s)

Karsten Luebke, karsten.luebke@fom.de

References

Garczarek, Ursula Maria (2002): Classification rules in standardized partition spaces. Dissertation, University of Dortmund. URL http://hdl.handle.net/2003/2789

Examples

library(MASS)
data(iris)
ldaobj <- lda(Species ~ ., data = iris)
ldapred <- predict(ldaobj)$posterior
e.scal(ldapred)
e.scal(ldapred, tc = iris$Species)

klaR

Classification and Visualization

v0.6-15
GPL-2 | GPL-3
Authors
Christian Roever, Nils Raabe, Karsten Luebke, Uwe Ligges, Gero Szepannek, Marc Zentgraf, David Meyer
Initial release
2020-02-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.