Skip to content

Commit

Permalink
User/Moment recommendations should use NodeMetadata graph (#97)
Browse files Browse the repository at this point in the history
* User/Moment recommendations should use NodeMetadata graph

* Fixing version number
  • Loading branch information
guimingTang authored Oct 6, 2017
1 parent d4bb605 commit 823283a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions graphjet-adapters/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.twitter</groupId>
<artifactId>graphjet</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</parent>

<groupId>com.twitter</groupId>
<artifactId>graphjet-adapters</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GraphJet Adapters</name>
<description>GraphJet is a real-time graph processing library: adapters for other graph systems</description>
Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>com.twitter</groupId>
<artifactId>graphjet-core</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
Expand Down
4 changes: 2 additions & 2 deletions graphjet-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.twitter</groupId>
<artifactId>graphjet</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</parent>

<groupId>com.twitter</groupId>
<artifactId>graphjet-core</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GraphJet Core</name>
<description>GraphJet is a real-time graph processing library: core graph library and recommendation algorithms</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.twitter.graphjet.algorithms.RecommendationInfo;
import com.twitter.graphjet.algorithms.counting.TopSecondDegreeByCount;
import com.twitter.graphjet.algorithms.counting.TopSecondDegreeByCountResponse;
import com.twitter.graphjet.bipartite.LeftIndexedPowerLawMultiSegmentBipartiteGraph;
import com.twitter.graphjet.bipartite.NodeMetadataLeftIndexedMultiSegmentBipartiteGraph;
import com.twitter.graphjet.bipartite.api.EdgeIterator;
import com.twitter.graphjet.stats.StatsReceiver;

Expand All @@ -32,15 +32,15 @@ public class TopSecondDegreeByCountForMoment extends
/**
* Construct a TopSecondDegreeByCount algorithm runner for moment recommendations.
* @param leftIndexedBipartiteGraph is the
* {@link LeftIndexedPowerLawMultiSegmentBipartiteGraph}
* {@link NodeMetadataLeftIndexedMultiSegmentBipartiteGraph}
* to run TopSecondDegreeByCountForMoment on
* @param expectedNodesToHit is an estimate of how many nodes can be hit in
* TopSecondDegreeByCountForMoment. This is purely for allocating needed
* memory right up front to make requests fast.
* @param statsReceiver tracks the internal stats
*/
public TopSecondDegreeByCountForMoment(
LeftIndexedPowerLawMultiSegmentBipartiteGraph leftIndexedBipartiteGraph,
NodeMetadataLeftIndexedMultiSegmentBipartiteGraph leftIndexedBipartiteGraph,
int expectedNodesToHit,
StatsReceiver statsReceiver) {
super(leftIndexedBipartiteGraph, expectedNodesToHit, statsReceiver);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.twitter.graphjet.algorithms.RecommendationInfo;
import com.twitter.graphjet.algorithms.counting.TopSecondDegreeByCount;
import com.twitter.graphjet.algorithms.counting.TopSecondDegreeByCountResponse;
import com.twitter.graphjet.bipartite.LeftIndexedPowerLawMultiSegmentBipartiteGraph;
import com.twitter.graphjet.bipartite.NodeMetadataLeftIndexedMultiSegmentBipartiteGraph;
import com.twitter.graphjet.bipartite.api.EdgeIterator;
import com.twitter.graphjet.stats.StatsReceiver;

Expand All @@ -32,15 +32,15 @@ public class TopSecondDegreeByCountForUser extends
/**
* Construct a TopSecondDegreeByCount algorithm runner for user related recommendations.
* @param leftIndexedBipartiteGraph is the
* {@link LeftIndexedPowerLawMultiSegmentBipartiteGraph}
* {@link NodeMetadataLeftIndexedMultiSegmentBipartiteGraph}
* to run TopSecondDegreeByCountForUser on
* @param expectedNodesToHit is an estimate of how many nodes can be hit in
* TopSecondDegreeByCountForUser. This is purely for allocating needed
* memory right up front to make requests fast.
* @param statsReceiver tracks the internal stats
*/
public TopSecondDegreeByCountForUser(
LeftIndexedPowerLawMultiSegmentBipartiteGraph leftIndexedBipartiteGraph,
NodeMetadataLeftIndexedMultiSegmentBipartiteGraph leftIndexedBipartiteGraph,
int expectedNodesToHit,
StatsReceiver statsReceiver) {
super(leftIndexedBipartiteGraph, expectedNodesToHit, statsReceiver);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import com.twitter.graphjet.algorithms.counting.moment.MomentRecommendationInfo;
import com.twitter.graphjet.algorithms.counting.moment.TopSecondDegreeByCountForMoment;
import com.twitter.graphjet.algorithms.counting.moment.TopSecondDegreeByCountRequestForMoment;
import com.twitter.graphjet.bipartite.LeftIndexedPowerLawMultiSegmentBipartiteGraph;
import com.twitter.graphjet.bipartite.NodeMetadataLeftIndexedMultiSegmentBipartiteGraph;
import com.twitter.graphjet.stats.NullStatsReceiver;

import it.unimi.dsi.fastutil.longs.Long2DoubleArrayMap;
Expand Down Expand Up @@ -140,8 +140,8 @@ private void testTopSecondDegreeByCountHelper(
List<TopSecondDegreeByCountRecommendationInfo> expectedTopResults,
RecommendationStats expectedTopSecondDegreeByCountStats
) throws Exception {
LeftIndexedPowerLawMultiSegmentBipartiteGraph bipartiteGraph =
BipartiteGraphTestHelper.buildSmallTestLeftIndexedPowerLawMultiSegmentBipartiteGraphWithEdgeTypes();
NodeMetadataLeftIndexedMultiSegmentBipartiteGraph bipartiteGraph =
BipartiteGraphTestHelper.buildSmallTestNodeMetadataLeftIndexedMultiSegmentBipartiteGraphWithEdgeTypes();

long queryNode = 1;
int maxSocialProofSize = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import com.twitter.graphjet.algorithms.counting.user.TopSecondDegreeByCountForUser;
import com.twitter.graphjet.algorithms.counting.user.TopSecondDegreeByCountRequestForUser;
import com.twitter.graphjet.algorithms.counting.user.UserRecommendationInfo;
import com.twitter.graphjet.bipartite.LeftIndexedPowerLawMultiSegmentBipartiteGraph;
import com.twitter.graphjet.bipartite.NodeMetadataLeftIndexedMultiSegmentBipartiteGraph;
import com.twitter.graphjet.stats.NullStatsReceiver;

import it.unimi.dsi.fastutil.longs.Long2DoubleArrayMap;
Expand Down Expand Up @@ -170,8 +170,8 @@ private void testTopSecondDegreeByCountHelper(
List<UserRecommendationInfo> expectedTopResults,
RecommendationStats expectedTopSecondDegreeByCountStats
) throws Exception {
LeftIndexedPowerLawMultiSegmentBipartiteGraph bipartiteGraph =
BipartiteGraphTestHelper.buildSmallTestLeftIndexedPowerLawMultiSegmentBipartiteGraphWithEdgeTypes();
NodeMetadataLeftIndexedMultiSegmentBipartiteGraph bipartiteGraph =
BipartiteGraphTestHelper.buildSmallTestNodeMetadataLeftIndexedMultiSegmentBipartiteGraphWithEdgeTypes();

long queryNode = 1;
int maxSocialProofSize = 4;
Expand Down
8 changes: 4 additions & 4 deletions graphjet-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.twitter</groupId>
<artifactId>graphjet</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</parent>

<groupId>com.twitter</groupId>
<artifactId>graphjet-demo</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>GraphJet Demo</name>
<description>GraphJet is a real-time graph processing library: demo of core graph library</description>
Expand All @@ -26,12 +26,12 @@
<dependency>
<groupId>com.twitter</groupId>
<artifactId>graphjet-core</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>graphjet-adapters</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.twitter</groupId>
<artifactId>graphjet</artifactId>
<version>1.1.3-SNAPSHOT</version>
<version>1.1.4-SNAPSHOT</version>
<packaging>pom</packaging>

<name>graphjet</name>
Expand Down

0 comments on commit 823283a

Please sign in to comment.