Is there a ready to use bipartite network projection function for SGraph?

User 1129 | 1/1/2015, 8:23:43 AM

Is there a ready to use bipartite network projection function for SGraph?

Comments

User 6 | 1/2/2015, 6:16:14 AM

Hi, I am not sure we are using the same terminology, but according the<a href="http://en.wikipedia.org/wiki/Bipartitenetworkprojection"> wikipedia entry</a> <img src="http://en.wikipedia.org/wiki/Bipartitenetworkprojection#mediaviewer/File:Bipartitenetworkprojection.png" alt="" /> bipartite network projection is a way for computing influence between nodes in one side of the network based on the connections to the other side. Our <a href="http://graphlab.com/products/create/docs/generated/graphlab.recommender.itemsimilarityrecommender.ItemSimilarityRecommender.html">item similarity method</a> in the recommender toolkit does exactly that, you can choose between many different cost functions like Jaccard or Cosine.


User 1129 | 1/2/2015, 7:29:38 AM

I'm talking about splitting bipartite graphs. For example, a graph has two types of nodes: users and films and the edges represent whether a user likes a film. Bipartite projection of this graph would be two graphs (1) Users as vertices. Users that like the same film have a connecting edge between them. (2) Films as vertices. Films that are liked by the same user have a connecting edge between them.


User 6 | 1/2/2015, 1:39:21 PM

Absolutely. For example:

<pre class="CodeBlock"><code>import graphlab

sf = graphlab.SFrame({'userid': ["0", "0", "0", "1", "1", "2", "2", "2"], ... 'itemid': ["a", "b", "c", "a", "b", "b", "c", "d"]}) m = graphlab.itemsimilarityrecommender.create(sf) nn = m.getsimilaritems() </code></pre>

nn now contains an SFrame which lists the similar books. Additional documentation is <a href="http://graphlab.com/products/create/docs/generated/graphlab.recommender.itemsimilarityrecommender.create.html">here</a>.