Skip to content

Conversation

@1rezatbz
Copy link

Description

Please briefly explain the changes you made here.

Pull request type

  • [ initial Hits and Personalized PageRank module ] Algorithm/Module
  • [ initial Hits and Personalized PageRank module ] Feature

######################################

Reviewer checklist (the reviewer checks this part)

Module/Algorithm

  • Core algorithm/module implementation
  • Query module implementation
  • Unit tests
    ######################################

@antoniofilipovic
Copy link
Contributor

Hi @1rezatbz, do you plan to work on this PR anymore?

@1rezatbz
Copy link
Author

1rezatbz commented Oct 7, 2022

Yes, of course. It is not totally finished.
I need a little help putting it in Memgraph.

@antoniofilipovic
Copy link
Contributor

Yes, of course. It is not totally finished. I need a little help putting it in Memgraph.

What do you need help with, and what is not finished? Let us know so we can help you better!

@1rezatbz
Copy link
Author

1rezatbz commented Oct 7, 2022

I implemented the algorithms and tested them like others, so it is alright.
But I don't know how to make the model use it inside the Memgraph.

@antoniofilipovic
Copy link
Contributor

I implemented the algorithms and tested them like others, so it is alright. But I don't know how to make the model use it inside the Memgraph.

Did you try following our docs page to enable Memgraph to use module?

@1rezatbz
Copy link
Author

Dear Antonio

I developed the HITS algorithm to a certain extent.

In the case of PageRank, I need your advice. The PageRank that already exists in MAGE is a simple one. It does not consider dangle nodes, personalization, Nstart, Edge weight, or dangling weight (out edges ).

The PageRank I implemented at the moment considers dangle nodes and personalization, and if I were to develop it, it would have Nstart, Edge weight, and Dangle weight.

MAGE can not have both of them (PageRank, personalized PageRank) . I believe there should be one PageRank that contains all features. What would you like PageRank to be?

However, I am concerned about my algorithm's time performance. I would appreciate it if you could check it out and provide me with feedback.

@antoniofilipovic
Copy link
Contributor

antoniofilipovic commented Oct 12, 2022

Dear Antonio

I developed the HITS algorithm to a certain extent.

In the case of PageRank, I need your advice. The PageRank that already exists in MAGE is a simple one. It does not consider dangle nodes, personalization, Nstart, Edge weight, or dangling weight (out edges ).

The PageRank I implemented at the moment considers dangle nodes and personalization, and if I were to develop it, it would have Nstart, Edge weight, and Dangle weight.

MAGE can not have both of them (PageRank, personalized PageRank) . I believe there should be one PageRank that contains all features. What would you like PageRank to be?

However, I am concerned about my algorithm's time performance. I would appreciate it if you could check it out and provide me with feedback.

Hi, no problem, we will check the performance of your algorithm and if it is the better version of PageRank, there will be only one version and it should be the better one. For now please connect it first to memgraph, and then we can help by checking performance and any other issues. Does that sound good to you?

@antoniofilipovic
Copy link
Contributor

Hi @1rezatbz, is something happening here :) do you need any help connecting the memgraph to the algorithm?

@1rezatbz
Copy link
Author

1rezatbz commented Nov 3, 2022

Dear Antonio,

I'm sorry for the delay, but I'm searching for a job and having to attend interviews and assessments.

As I told you, I developed the Hits Algorithm connection, and I think it's ready. The problem I have is with PageRank. My page rank algorithm requires the user's personalization vector. The right way to do that isn't clear to me. To get help from other existing algorithms in Mage, I considered other existing algorithms, but I could not find any clues. I would appreciate it if you could look at my PageRank code and give me some suggestions!

@gitbuda gitbuda changed the title implementing initial Hits and Personalized PageRank module Add Hits and Personalized PageRank module Jun 14, 2023
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces two new graph analysis algorithms: HITS (Hyperlink-Induced Topic Search) and Personalized PageRank. These link analysis algorithms compute node importance scores for directed graphs, with HITS calculating hub and authority scores while Personalized PageRank extends the standard PageRank algorithm with node-specific biasing.

Key Changes:

  • Implementation of parallel HITS algorithm with hub and authority score computation
  • Implementation of parallel Personalized PageRank algorithm with customizable personalization vectors
  • Test suites for both algorithms with multiple graph configurations

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
cpp/hits_module/algorithm/hits.hpp Header file defining the HITS algorithm interface and HitsGraph class
cpp/hits_module/algorithm/hits.cpp Core implementation of parallel HITS algorithm with thread-based computation
cpp/hits_module/hits_module.cpp Query module wrapper for HITS algorithm integration
cpp/hits_module/hits_test.cpp Unit tests for HITS algorithm with various graph configurations
cpp/hits_module/CMakeLists.txt Build configuration for HITS module and tests
cpp/personalised_pagerank_module/algorithm/personalised_pagerank.hpp Header file defining Personalized PageRank interface and PageRankGraph class
cpp/personalised_pagerank_module/algorithm/personalised_pagerank.cpp Core implementation of parallel Personalized PageRank with personalization vector support
cpp/personalised_pagerank_module/personalised_pagerank_test.cpp Unit tests for Personalized PageRank with various graph configurations
cpp/CMakeLists.txt Updated to include HITS module in build

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
13.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@mattkjames7
Copy link
Contributor

Test run on staging branch here: https://github.com/memgraph/mage/actions/runs/20271349928

@mattkjames7
Copy link
Contributor

Hi @1rezatbz I'm trying to close all PRs on MAGE prior to moving everything into the memgraph repo. I have made some fixes to get this through CI, would you mind signing our CLA please, so that I can merge it?
Thanks 😁

@mattkjames7 mattkjames7 self-assigned this Dec 16, 2025
@mattkjames7 mattkjames7 added this to the mage-v3.8.0 milestone Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs needed Docs needed feature feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants