May-19-2020, 10:28 PM
The code uses third-party machine learning libraries, so it is likely nothing
to improve with those. However, I suspect that the bottleneck is for-loop (line No. 23);
I don't know exactly, but you can try to pass to
be slightly faster.
to improve with those. However, I suspect that the bottleneck is for-loop (line No. 23);
I don't know exactly, but you can try to pass to
afn.score
the entire array test_reviews[sample_review_ids]
. If afn.score
is implemented, e.g. in C, the computations will be slightly faster.