So by the end of Sunday I had decided that Saturday had been a complete waste of time, Archive databases are just to slow to search for what I want to do. So I went back to my old code and dataset and realised that there was an error in my code, it never did the prediction, so it wasn’t taking 10 second to complete one search for one user for one item (which was bad enough) it was taking 4 minutes!
Luckily I couldn’t meet Neil this week because I’ve just now tweaked the code with some impressive results;
Code as it was:
274.705768108
Some optimising (got rid of pow, replaced get row (one thing I did learn form Saturday)):
264.114817858
same again:
384.454499006
and again:
269.587982893
Then I tried it with a persistent db connection:
31.9353189468
Why I didn’t thing of this before I don’t know, after all the prediction algorithm has a loop for weight and mean both of which were making a fresh connection each time.
I still have to see about doing nearest neighbour but this has given me new hope and there are still areas I know I can look about speeding up.
No Comments | In: Fourth Year Project, Review | | #