softmax {EMSNM} | R Documentation |
Calculate the Softmax Value of each subgroup to represent the probability of items belonging to specific class.
softmax(eta, X)
eta |
the coeffients determining subgroup |
X |
the covariables determining subgroup |
Softmax Value of each subgroup
Linsui Deng
#some variables
samplesize <- 1000
classsize <- 6
etasize <- 3
alphasize <- 2
#test of softmax
Xtest <- data.frame(matrix(rnorm(samplesize*etasize),samplesize,etasize))
etatest <- matrix(seq(1.15,1,length=etasize*classsize),etasize,classsize)
softmax_value <- softmax(etatest,Xtest)