grahamjenson / ger Goto Github PK
View Code? Open in Web Editor NEWGood Enough Recommendation (GER) Engine
Good Enough Recommendation (GER) Engine
This would make sense if the use case supports like/dislike, someone may accidentally dislike an item, then undo the action and still receive bogus recommendation
Hello, did you ever think about a MongoDB / Mongoose storage manager?
I'm currently thinking about using GER but switching over to RethinkDB is a little hurdle. Especially as RethinkDB is (so far) not available for my Windows System.
given any person action thing return the events that match, with pageination
This will allow a specific GER instance to point at a Read-Only PG Replica for scalability reasons
I have tried the last few days trying to get ger to run in AWS lambda, when I use memory (Which doesn't make sense to use) it works. But if I use Postgres it just stalls and times out. I tried upgrading knex and pg (btw 4.3.3, has a bug, it can't connect to other than localhost), but it is still the same.
Have you tried it?
Hi, this is a question of the kind: "Should I use GER form my purpose?"
My ultimate target is to map users that share the same interests. Every user therefore shares an URL that links to webpage that 'represents' the user.
I already set up a system that is able to scrape the main textual content from the HTML, extract the semantic entities and calculate the similarity (a value between 0 and 1) of the two texts.
Given that value I'm already able to 'recommend' a User to another, simply based on the similarity score of the profile texts.
Now I'm thinking about improving this recommendation with a system like GER. Interpreting a profile as an item and interpreting the view of a profile as event I could easily get recommendations from GER... BUT:
How to combine the recommendation based on user behavior and that one based on text similarity so that both together give a better result?
Also: Given two profiles of two users (U1 and U2). Could GER calculate a 'level of recommendation'... that would be an answer to the question of U1: "How recommended is U2 to me"?
I'm looking forward to this discussion....
Hi, is GER still working? I try but I can't get any recommendation.
My data;
[
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: 'kZv2xOCio',
expires_at: 2025-06-05T21:00:00.000Z
},
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: 'kZv2xOCio',
expires_at: 2025-06-05T21:00:00.000Z
},
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: 'kZv2xOCio',
expires_at: 2025-06-05T21:00:00.000Z
},
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: '3rpg8EI3g',
expires_at: 2025-06-05T21:00:00.000Z
},
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: '3rpg8EI3g',
expires_at: 2025-06-05T21:00:00.000Z
},
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: 'kZv2xOCio',
expires_at: 2025-06-05T21:00:00.000Z
},
{
namespace: 'blog',
person: '632e7fc49f95b1f517887ada',
action: 'like',
thing: 'kZv2xOCio',
expires_at: 2022-09-24T04:17:19.000Z
}
]
And I try;
const g = require('ger')
const Recommendation = require('../models/recommendation.model')
var esm = new g.MemESM()
var ger = new g.GER(esm);
ger.initialize_namespace('blog')
ger.initialize_namespace('user')
ger.initialize_namespace('comment')
const data = await Recommendation.find({},{_id:0, namespace:1, person:1, action:1, thing:1, expires_at:1})
ger.events(data)
ger.recommendations_for_person('blog', '632e7fc49f95b1f517887ada', {actions: {like: 1}})
It should recommend something but It's not doing. Why?
Edit: Also I try your examples too and thats nothing returning to
Is there a way to delete people from the database. This could be helpful in a web app when a user deletes their account.
The changes are: If an event has an expires_at date:
This is to ensure that in a live system that no recommendation can be given from an expired event, or a specified time can be given that any recommendation based on a event must expire after. This is useful if because if you are generating recommendation for a website then a the user may need a few minutes to explore the recommendations so returning something that expires in say 5 seconds time would be useless OR if generating recommendations for an email campaign then returning recommendations that expire in the next few hours would be useless as well.
@thelinuxlich could you have a look at the recently_actioned_things_by_people method in the rethinkDB esm, I am sure you will find it basic to update but I could not see how :)
This will mean when requesting the recommendations the action weights are defined making it easier to experiment and override for testing.
This is more a question. I am still going through the library. Is there a way that we could use ger to get the trending things with time decay. like trending topics?
Query an ESM about its statistics, e.g.
Just curious
Implement
get_namespaces
in the ESMs to return a list of the existing namespaces that are available.
This is necessary so that a server that services multiple namespaces does not have to change the namespace for every call.
Since GER is already using similarity to recommend items, could there be a straight up API for finding similar people themselves?
Very very useful for community building.
I console logged ger and i didn't see any ESM for rethinkdb
Write some Contributor documentation
I know how to find the closest things for people, but how to do the reverse?
How, given say a particular video, can you find the people who would be most likely to want to watch it?
Define a way to properly separate ESMs and other custom logic into separate modules.
Something to bootstrap available things to act on
I see that GER's repo has no activity from mid-2019 so just asking if GER is maintained because I find it the best one I found for recommendations in my project @dogegramHQ (a social media).
Two types of Compression
Lossless:
Lossy:
have the minimum_history_required value only count the suuplied actions in the configuration, as these are the only ones used for the calculation anyway
Create a configuration that does not recommend things that expire in an amount of time in seconds from now.
For example:
If you generate recommendations that expires in the next few seconds it is probably pointless to recommend. If it expires in the next 15 minutes then it is useful online channel, but via email it is not great. and so on.
I've started working on a RethinkDB adapter for this great project, it's on my fork:
https://github.com/thelinuxlich/ger/
So far, 44 of 70 tests are passing, I'm lagging behind the latest commit(as of 01/12/2014), but the great challenge is to match the same weight of the jaccard algorithm using SQL, if anyone has suggestions, please come here :)
Improve performance of RethinkDB ESM by adding indexes and moveing Node.js Logic to the database query.
bracng rethink_performance
Hi,
I can't find what is the license for this software, is this for any reason or is just missing ? I really would like to start using your module for some projects but I can't if its not licensed.
I would suggest Apache 2.0 or MIT.
Cheers.
It may be a good idea to decrease the value of an event as it gets closer to the expiry date, so that movies that Bob watched 3 months ago and movies he watched yesterday aren't valued the same in the system. I didn't have time to review the source code, but if is not there, this may be a good new feature.
I've been pursuing GER for around 2 days now (it's very suitable for my project) - the docs are pretty out of date so trying to get it to work and figuring out each component is pretty much trial and error + looking at the ger.coffee file and test files. This is basically it without all of my code (eg. fetching the actual data):
require('coffee-script/register');
var bb = require('bluebird');
var async = require('async');
var g = require('ger');
var ns = 'Contra';
var GER = g.GER;
var esm = new g.MemESM(ns, options = {});
esm.initialize(ns);
var ger = new GER(esm);
var userId = 'id';
var action = 'view';
var things = []; // Pretend there's a bunch of strings here....
// Things is an array of strings of "topics" eg. Apple, Google, Politics, Philosophy, Obama, etc.
for (var i = 0; i < things.length; i++)
events.push(ger.event(ns, userId, action, things[i], {}));
bb.all(events).then(function() { // `events` array has 10,000 objects
return ger.recommendations_for_person(ns, userId, action, {actions: {'view': 2, 'reply': 5, 'share': 3}});
}).then(function(recs) {
console.log(recs);
});
OK, so the problem is that the recommendation array is empty. I get some neighbourhood object and a confidence of 0. I'm training on around 10,000 events sourced from my database. I tried logging the events with (find_events
) but only 50 are returned (which I think is by design and there is a setting/config somewhere to change that). Though, when I log count_events
only around ~2000 is returned, which again, is strange, because I trained with 10,000 events. I'm not sure, though, that this issue is causing the lack of any recommendations (2000 is still a lot to train on), it's just another issue I've run into. There's a lot of stuff that's ambiguous eg. how to set the action weights and where to do so, I did it based on your test code (not on your docs).
Thanks!
I was looking through the find_events
method to check out how it handles expiries and their wasn't an obvious way to pull in all events that haven't expired. Does this exist? something i overlooked?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.