softmax: Softmax Value

Description Usage Arguments Value Author(s) Examples

View source: R/softmax.R

Description

Calculate the Softmax Value of each subgroup to represent the probability of items belonging to specific class.

Usage

1
softmax(eta, X)

Arguments

eta

the coeffients determining subgroup

X

the covariables determining subgroup

Value

Softmax Value of each subgroup

Author(s)

Linsui Deng

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#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)

EMSNM documentation built on May 2, 2019, 1:41 p.m.