Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add personalrank and neighborrank RESTful API #274

Merged
merged 15 commits into from
Apr 19, 2019
Merged

Add personalrank and neighborrank RESTful API #274

merged 15 commits into from
Apr 19, 2019

Conversation

Linary
Copy link
Contributor

@Linary Linary commented Dec 10, 2018

Change-Id: Ifc65c488aac51111551e78bf3deb5790c5e83491

@Linary Linary force-pushed the neighbor-rank branch 3 times, most recently from b376b2f to 3ec773d Compare December 12, 2018 01:52
}
// The rank of each seed vertex is attenuated to original * (1 - alpha)
for (Object vertexId : seedVertices) {
double oldRank = rank.get(vertexId) * (1 - alpha);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will incorrect if have loop

consumer.accept(tmpSeeds);

double sourceRank = tmpRank.get(sourceV);
sourceRank += (1 - alpha);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://blog.csdn.net/bbbeoy/article/details/78646635

source vertex need add (1 - alpha) every time

javeme
javeme previously requested changes Dec 17, 2018
while (++depth <= this.maxDepth) {
Map<Id, Double> rankIncrs = this.getRankIncrs(seeds, labelDirs,
labelId, ranks);
this.combineIncrement(seeds, ranks, rankIncrs);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ranks = this.combineIncrement()

Map<Id, Double> ranks) {
Map<Id, Double> rankIncrs = new HashMap<>();
for (Id seed : seeds) {
Vertex vertex = this.graph().vertices(seed).next();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will reduce the performance

@codecov
Copy link

codecov bot commented Apr 3, 2019

Codecov Report

Merging #274 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #274      +/-   ##
===========================================
- Coverage     68.94%   68.9%   -0.04%     
  Complexity     3278    3278              
===========================================
  Files           208     208              
  Lines         16171   16170       -1     
  Branches       2327    2327              
===========================================
- Hits          11149   11142       -7     
- Misses         3777    3783       +6     
  Partials       1245    1245
Impacted Files Coverage Δ Complexity Δ
...m/baidu/hugegraph/backend/query/IdPrefixQuery.java 62.96% <100%> (+1.42%) 8 <0> (ø) ⬇️
.../java/com/baidu/hugegraph/version/CoreVersion.java 80% <100%> (ø) 2 <1> (ø) ⬇️
.../java/com/baidu/hugegraph/backend/query/Query.java 71.66% <100%> (+1.75%) 50 <1> (+1) ⬆️
...om/baidu/hugegraph/backend/query/IdRangeQuery.java 60% <100%> (+1.66%) 7 <0> (ø) ⬇️
...hugegraph/backend/serializer/BinarySerializer.java 80.1% <100%> (-0.33%) 102 <0> (ø)
...n/java/com/baidu/hugegraph/task/TaskScheduler.java 51.45% <0%> (-1.25%) 26% <0%> (-1%)
...du/hugegraph/backend/tx/GraphIndexTransaction.java 79.36% <0%> (-0.48%) 145% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf80faf...6b2ab28. Read the comment docs.

@Linary Linary force-pushed the neighbor-rank branch 5 times, most recently from d9998a5 to 5936537 Compare April 10, 2019 12:14
} else if (o1 < o2) {
return 1;
} else {
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will it delete duplicated values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No

Change-Id: I66e4224b5813aa2d5eadbfe540fb9de203db766b
Change-Id: I8cb701940a323883796c6cbc60dd8b17d4f6ba88
Linary added 2 commits April 16, 2019 15:38
Change-Id: I8f02506cbc3acfa62072f46e4f2000e5edd8502c
Change-Id: Ib66fce20642e89b49a7bf45edb223ab4bd5c27dd
Change-Id: I79b2d6ae1f780728cc935c147ca8d96f3a786bf8
Change-Id: I5012e7e7be649ccf7c7de160354a39b980fecf48
Change-Id: I8c27b23216bd9ee97c2afa613890a6a23b66df5d
Change-Id: I2bd0d75f0a798015ea302679cdf2635b7fc80745
Change-Id: I4ae50946c46a016872848dbcd9f69e70b6f290a2
Change-Id: I9829eacea9e8598a4475b39bd9699ea951de6a97
@Linary Linary force-pushed the neighbor-rank branch 2 times, most recently from 23add91 to 44e2712 Compare April 18, 2019 03:44
Change-Id: Ib8c2da1f85c9e78504d704b0b3629a24b0666e42
Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove @Status(Status.CREATED) for CustomizedPathsAPI and CustomizedCrosspointsAPI

Change-Id: Iccda41b7869a53a77177d342754f080f6e4612e4
javeme
javeme previously approved these changes Apr 18, 2019
Change-Id: I9cb451b4612ff540da9e1045a44970e119d35d6e
@javeme javeme merged commit 2890c96 into master Apr 19, 2019
@javeme javeme deleted the neighbor-rank branch April 19, 2019 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants