Description Usage Arguments Value Author(s) Examples
View source: R/get_K_Q.R View source: R/rauc.R
computes ramp function value from paired difference of linear combinations
1 | ramp.f (eta,s,loss=TRUE)
|
eta |
a vector of paired difference of linear combinations |
s |
absolute value of the slope parameter |
loss |
a boolean. If TRUE, return loss function i.e. 1 - RAUC. If FALSE, rturn RAUC. Default to TRUE, because we minimize loss. |
A vector of sames size as eta
Shuxin Yin
Youyi Fong youyifong@gmail.com
Krisztian Sebestyen
1 2 3 4 5 6 7 8 9 10 11 12 13 | dat = sim.dat.1(n=100,seed=1)
X1 = as.matrix(subset(dat, y==0, select=c(x1,x2)))
X2 = as.matrix(subset(dat, y==1, select=c(x1,x2)))
X.diff = get.X.diff (X1, X2)
dim(X1)
dim(X2)
dim(X.diff)
aux = ramp.f(X.diff %*% c(1,1), s=1)
length(aux)
mean(aux)
aux = ramp.f(X.diff %*% c(1,1), s=1, loss=FALSE)
length(aux)
mean(aux)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.