[Bug 6772] New: Implementation of a recommendations engine
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Bug #: 6772 Summary: Implementation of a recommendations engine Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: OPAC AssignedTo: oleonard@myacpl.org ReportedBy: robin@catalyst.net.nz QAContact: koha-bugs@lists.koha-community.org We'd like the ability to have the OPAC say "other people who read this, also read that." We have some very old code that does that, so I'm going to make it work with 3.4 and generally tidy it up. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Change sponsored?|--- |Sponsored AssignedTo|oleonard@myacpl.org |robin@catalyst.net.nz -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 --- Comment #1 from Robin Sheat <robin@catalyst.net.nz> 2011-08-25 06:38:10 UTC --- Created attachment 5144 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5144 Bug 6772 - recommendation system This allows Koha to link similar books to provide recommendations to users. It provides a cron job that should be run regularly (daily or weekly perhaps) to build a recommendation index. When viewing books in the OPAC, those items with the closest match will be displayed. Author: Chris Cormack <chris@bigballofwax.co.nz> Author: Robin Sheat <robin@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff --- Comment #2 from Robin Sheat <robin@catalyst.net.nz> 2011-08-25 06:48:39 UTC --- Testing notes: you'll need a database with entries in old_issues, turn on the syspref (in Opac->Features->ShowRecommendations) and then run the cron job (misc/cronjobs/recommendations.pl.) This will take a fair while to run, and when it's done, viewing a record in the OPAC that's ever been borrowed will give a list of recommendations. Some points: * This will conflict with anonymising history. * It's slow to build the index. * I'd like to have it update the database as items get returned (perhaps as a queue) to allow it to not have to spend ages running a terribly long cron job. But that'll require some thought on how to approach it. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5144|0 |1 is obsolete| | --- Comment #3 from Frédéric Demians <frederic@tamil.fr> 2011-09-01 12:02:38 UTC --- Created attachment 5250 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5250 Signed-off patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #4 from Frédéric Demians <frederic@tamil.fr> 2011-09-01 12:03:25 UTC --- It works as announced. I confirm 'recommendations' table generation is insanly slow. The result is a huge table. For a smallish 25,000 items DB, I get a recommendation table with 3,728,251 records! If 'recommendations' has to be truncated and re-created frequently, coupled with MySQL issue not releasing innodb freespace, that could conduct to disk out-of-space. Another issue is on the OPAC Recommendations tab. It shows the 100 first related books. It would be nice to have a syspref to reduce the list. I sign-off this patch, since it's disabled by default. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> 2011-09-01 23:36:15 UTC --- Yep, I agree with all your points :) I'm thinking that this is a suitable starting point, there are a lot of improvements that can be made. In particular, I'd like to build a queue of returns that have occurred, and at the end of the day just merge that with the existing index. This would make it terribly faster. Also, I'd somehow like to reduce the number of rows it puts into the database (I already halved it from the original implementation :) but I'm not quite sure how. Another thing that would be fun to do is allow it to integrate with star ratings, so 1 star counts as a negative weight, and 5 as a really positive one. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Failed QA --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-06 14:44:48 UTC --- This is not as assistant QA manager that I write this. I've been thinking for long to this feature. With anonymization that is mandatory after 3 months in France, such a feature, that rebuild from scratch all associations, will mostly be useless. The only solution I see would be to have the recommendations table being filled incrementally : we run it every week, and deal only with issues of the week (linked to all readings still in old_issues/issues table) That would not be perfect (you won't connect a book issued today to a book issued 6 months ago, as it has been anonymized), but that would be much better than the actual behaviour. That would also solve the speed problem noticed by you & Frédéric Note : to avoid the DB space, the solution is to create the table with engine=myISAM As there are no constraints, that won't do any difference Marking "failed QA" as the feature as it is today is unusable. Too bad, it's something i'm dreaming of ! -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 --- Comment #7 from Robin Sheat <robin@catalyst.net.nz> 2011-10-06 22:53:29 UTC --- I'm fine with that, I'll just have to find the time to make it work incrementally. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 --- Comment #8 from Chris Hall <chrish@catalyst.net.nz> --- Created attachment 17483 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17483&action=edit Fixing array reference bug in recommendations.pm Attached patch fixes a small reference bug in Recommendations.pm (included in the previous patch) that only occurs when we have more recommendations than the limit (default value of 100) $res = \@{ @{$res}[0..$limit] } if (@$res > $limit); will cause an error as it tries to interpret the items within $res as arrayrefs when they are hashrefs. What we really want to do is shorten our results down to never be longer than limit: $res = [ @{$res}[0..$limit] ] if (@$res > $limit); -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 CC| |katrin.fischer@bsz-bw.de --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Robin and Chris, as this adds a new module I think we will need unit tests for it. Maybe also worth moving it to the Koha namespace? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 --- Comment #10 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to comment #9)
Hi Robin and Chris, as this adds a new module I think we will need unit tests for it. Maybe also worth moving it to the Koha namespace?
It would need a lot more really. We're mostly leaving it here because we use it, and other people might want it too. For eligibility to Koha, it'd need a lot of work to address Frédéric and Paul's points as well. But yes, new namespace and unit tests would also be good things. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Robin Sheat from comment #10)
It would need a lot more really. We're mostly leaving it here because we use it, and other people might want it too. For eligibility to Koha, it'd need a lot of work to address Frédéric and Paul's points as well. But yes, new namespace and unit tests would also be good things.
Does it mean you don't plan to work on it anymore? If so, then could you remove your name from the assigned to field? -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|robin@catalyst.net.nz |oleonard@myacpl.org Change sponsored?|Sponsored |--- -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org