How do I manually change the coefficient of an R nnet::multinom model object?
I tried :
S = summary(multi_mod)
S$coefficients = coef_hitl
But if I check out the multi_mod
object, the coefficient is NOT changed.
Also, is there a nice Matrix format of predicting multinomial logistic regression on a new dataset? Something like this so that I could manually do the prediction?
X * (X'*X)^-1 * X'*y