Cpp function: Calculate the estimated probability using softmax function (multinomial regression).

calcProb(X, B)

Arguments

X

a data matrix of input in multinomial regression.

B

coefficients in multinomial regression.

Value

A matrix of multinomial probability with p_i=exp(X %% B_i)/sum(X %% B)