Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:17:59+00:00 2026-06-03T05:17:59+00:00

I am trying to develop a simple ranking algorithm for a social network based

  • 0

I am trying to develop a simple ranking algorithm for a social network based on the number of likes, comments, and reposts receiving and time. I have been reading about the edge rank algorithm that facebook uses and tried to do something similar but I cannot get it right.

The algorithm should show the popular posts now.

Here is what i tried:

let nComments = (from c in db.Comments where c.postid == r.pageOwner.PostId select c).Count()

let nReposts = (from s in db.Posts where s.RepostedFrom_postid == r.pageOwner.PostId select s).Count()

let nLikes = (from u in db.UserPageRelations where u.Post_id == r.pageOwner.PostId select u).Sum(s => s.Rate)

let TimeDecayFactor = ignoretime ? 1 : Math.Exp(-(DateTime.Now - Post.Date).TotalHours)

let TotalEdge = (1 * nComments + 3 * nLikes + 2 * nReposts + 1) * TimeDecayFactor

 orderby (TotalEdge) descending

does anyone have a better solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:18:00+00:00Added an answer on June 3, 2026 at 5:18 am

    You could use the PageRank algorithm to give a popularity to everyone. This algorithm is designed for ranking websites using links between them but you can use comments, reposts and likes (with different coefficients) instead of links.

    If you think PageRank is too tough to implement (because of the size of the data), you can use the opic algorithm which produces the same results but requires significantly less memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to develop a simple text-based hangman game, and the main game loop
I'm trying to develop a simple php based schedule ... This is my database
I am trying to develop a simple application in C# to count the number
I am trying to develop a concept for a simple algorithm which will turn
I'm trying to develop a simple kernel using TASM, using this code: ; beroset.asm
I'm trying to develop a simple tracking system. What I'm trying to do is
I am trying to develop a simple game where a group of user can
I am studying CSS3 and HTML5 and trying to develop a simple homepage. Since
I'm trying to develop a pretty simple (for now) wrapper class around int ,
I need some help! Please. I am trying to develop a very very simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.