Nicholas Hassan
Nicholas Hassan

Reputation: 969

Summary function extremely slow with nnet's multinom compared to regression function

I'm using the multinom() function in the nnet package. My data has a little over a million rows and 4 independent variables. The multinom() function itself creates a model within ~15 minutes, and I can view coefficients.

I need to access them as an object though (with $coefficients) but I can't unless I save a summary() of it. When I try summarizing my model, it's run for over 30 minutes with no end in sight.

Is there any reason the summary() function takes so long, for what seems to be a basic reporting tool? How can I speed it up? Is there another way to access the coefficients?

Upvotes: 2

Views: 1474

Answers (1)

F. Privé
F. Privé

Reputation: 11738

If you just want the coefficients, use only the coef() method, which do much less computations.

Upvotes: 4

Related Questions