rater icon indicating copy to clipboard operation
rater copied to clipboard

Optimise the extraction of the class probabilites

Open jeffreypullin opened this issue 5 years ago • 3 comments

The softmaxing seem to be the bottleneck

jeffreypullin avatar Jun 25 '20 12:06 jeffreypullin

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)

dvukcevic avatar Jun 25 '20 13:06 dvukcevic

Yes, I considered that. I would like to try to optimize the actual calculation first though, if that is actually possible.

jeffreypullin avatar Jun 25 '20 13:06 jeffreypullin

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

jeffreypullin avatar Jul 18 '20 06:07 jeffreypullin