Recommendation engine example.

45 views
Skip to first unread message

Ernesto Cambuston

unread,
Mar 25, 2018, 10:49:27 AM3/25/18
to Gremlin-users

Currently working on a proof of concept for a recommendation engine.


Example.https://github.com/erneestoc/graph_example/blob/master/src/java/com/example/ExampleTraversalDsl.java#L18


I'm trying to filter the first steps matched friends before the groupCount.


What would be the correct way of doing this?

Daniel Kuppitz

unread,
Mar 25, 2018, 11:02:42 AM3/25/18
to gremli...@googlegroups.com
Not sure what you mean, can you please clarify?

I'm trying to filter

Filter by what?

the first steps matched friends before the groupCount

You mean the friends of friends?

Cheers,
Daniel


--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/1dab4223-ebbe-4cbc-bd52-6e629a582b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ernesto Cambuston

unread,
Mar 25, 2018, 2:05:20 PM3/25/18
to Gremlin-users
I'm want to remove the friends the user already know, from the friends of friends results.


On Sunday, March 25, 2018 at 8:02:42 AM UTC-7, Daniel Kuppitz wrote:
Not sure what you mean, can you please clarify?

I'm trying to filter

Filter by what?

the first steps matched friends before the groupCount

You mean the friends of friends?

Cheers,
Daniel

On Sun, Mar 25, 2018 at 3:32 AM, Ernesto Cambuston <e.cam...@gmail.com> wrote:

Currently working on a proof of concept for a recommendation engine.


Example.https://github.com/erneestoc/graph_example/blob/master/src/java/com/example/ExampleTraversalDsl.java#L18


I'm trying to filter the first steps matched friends before the groupCount.


What would be the correct way of doing this?

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.

Ernesto Cambuston

unread,
Mar 25, 2018, 4:19:03 PM3/25/18
to Gremlin-users
Got the desired result aggregating the first step results, and using `where(P.without("x"))`.. is this the correct way of doing it?

https://github.com/erneestoc/graph_example/blob/master/src/java/com/example/ExampleTraversalDsl.java#L24

Daniel Kuppitz

unread,
Mar 25, 2018, 8:18:07 PM3/25/18
to gremli...@googlegroups.com
Yea, but you can remove the labels.

     return out("friendship").aggregate("x")
    .out("friendship")
                .where(P.without("x"))
    .groupCount()
            .by("email")
            .order(Scope.local)
            .by(Column.values, Order.decr)
                .limit(Scope.local, limit);

Cheers,
Daniel


To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/3ee00334-b028-4569-801a-16610d2b025e%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages