rater
rater copied to clipboard
Optimise the extraction of the class probabilites
The softmaxing seem to be the bottleneck
A suggestion that doesn't change the amount of computation but shifts it to a different place:
Perhaps we could pre-compute the class probabilities? For example, do it as part of the inference computations, straight after MCMC/optimisation?
Users are less likely to notice them there if they are waiting for the MCMC anyway. That's not so true for optimisation given how fast that is, but perhaps that's fine, it's not a huge time to wait?
(This comment is lifted from #90)
Yes, I considered that. I would like to try to optimize the actual calculation first though, if that is actually possible.
One way of doing this would be to use the generated_quantities block in Stan itself to calculate the probabilities.
I don't this is a priority right now though so let's revisit post 0.2