Giter VIP home page Giter VIP logo

ger's People

Contributors

azhang66 avatar bryant1410 avatar grahamjenson avatar killercup avatar nikashitsa avatar thelinuxlich avatar tvvignesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ger's Issues

Removing existing events

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

MongoDB / Mongoose ESM

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.

Find events

given any person action thing return the events that match, with pageination

Running GER in AWS Lamba

Hi @grahamjenson

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?

The similarity of items...

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....

Is still working?

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

Delete Person

Is there a way to delete people from the database. This could be helpful in a web app when a user deletes their account.

Some new changes to recently_actioned_things_by_people breaks some tests in the RethinkdbESM

The changes are: If an event has an expires_at date:

  1. Don't return expired events by default
  2. accept a expires_after date which filters events that do not expire after the given 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 :)

get most popular with time decay

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?

Statistics Information

Query an ESM about its statistics, e.g.

  1. Number of total Events
  2. Number of total People
  3. Number of total Things

ESM List Namespaces

Implement

get_namespaces

in the ESMs to return a list of the existing namespaces that are available.

Finding similar people?

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.

Finding best people for things

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?

Is GER maintained?

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).

Compact Database Algorithms

Two types of Compression

Lossless:

Lossy:

  • remove all actions that are performed by many people, e.g. view popular product is done by many people remove all events where <?,view,popular_product>. These events are low in entropy because many different people do them. Problems: should not remove high value actions, dataset dependant.

Add filter to exclude recommendations that expire soon

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.

RethinkDB Adapter

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 :)

RethinkDB ESM Performance

Improve performance of RethinkDB ESM by adding indexes and moveing Node.js Logic to the database query.

bracng rethink_performance

License

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.

New feature: event weight decay

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.

Need some help with the API (docs seem outdated)

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!

easy way to find_events that aren't expired?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.