Recommendations for a scoring formula for sorting a location based social network's post feed












0












$begingroup$


I'm building a location based social networking app. The idea is to allow users to post and interact with people nearby. The main feed of the app would show posts based on their proximity (d = how far the post was posted) and recency (a = how long ago was it posted).



I am trying to come up with a formula which would score each post for sorting and achieve the following objectives:




  • High recency and high proximity posts show first (e.g d=1km, a=1 hour)

  • If a post is high proximity but quite old (e.g. d=1km, a=5 days), slightly further results (e.g. d=5km, a=1 hour) rank higher

  • Very far off posts (e.g. d=10000, a=1 hour) would only rank higher than nearby posts which are extremely old (e.g. d=10km, a=1 year)


We are trying to strike a balance between seeing things which are local enough too be relevant yet fresh. While algorithmic solutions are possible, at this point we are looking for a formula to score and sort posts. Looking for suggestions for suitable scoring formulas.










share|cite|improve this question









$endgroup$

















    0












    $begingroup$


    I'm building a location based social networking app. The idea is to allow users to post and interact with people nearby. The main feed of the app would show posts based on their proximity (d = how far the post was posted) and recency (a = how long ago was it posted).



    I am trying to come up with a formula which would score each post for sorting and achieve the following objectives:




    • High recency and high proximity posts show first (e.g d=1km, a=1 hour)

    • If a post is high proximity but quite old (e.g. d=1km, a=5 days), slightly further results (e.g. d=5km, a=1 hour) rank higher

    • Very far off posts (e.g. d=10000, a=1 hour) would only rank higher than nearby posts which are extremely old (e.g. d=10km, a=1 year)


    We are trying to strike a balance between seeing things which are local enough too be relevant yet fresh. While algorithmic solutions are possible, at this point we are looking for a formula to score and sort posts. Looking for suggestions for suitable scoring formulas.










    share|cite|improve this question









    $endgroup$















      0












      0








      0





      $begingroup$


      I'm building a location based social networking app. The idea is to allow users to post and interact with people nearby. The main feed of the app would show posts based on their proximity (d = how far the post was posted) and recency (a = how long ago was it posted).



      I am trying to come up with a formula which would score each post for sorting and achieve the following objectives:




      • High recency and high proximity posts show first (e.g d=1km, a=1 hour)

      • If a post is high proximity but quite old (e.g. d=1km, a=5 days), slightly further results (e.g. d=5km, a=1 hour) rank higher

      • Very far off posts (e.g. d=10000, a=1 hour) would only rank higher than nearby posts which are extremely old (e.g. d=10km, a=1 year)


      We are trying to strike a balance between seeing things which are local enough too be relevant yet fresh. While algorithmic solutions are possible, at this point we are looking for a formula to score and sort posts. Looking for suggestions for suitable scoring formulas.










      share|cite|improve this question









      $endgroup$




      I'm building a location based social networking app. The idea is to allow users to post and interact with people nearby. The main feed of the app would show posts based on their proximity (d = how far the post was posted) and recency (a = how long ago was it posted).



      I am trying to come up with a formula which would score each post for sorting and achieve the following objectives:




      • High recency and high proximity posts show first (e.g d=1km, a=1 hour)

      • If a post is high proximity but quite old (e.g. d=1km, a=5 days), slightly further results (e.g. d=5km, a=1 hour) rank higher

      • Very far off posts (e.g. d=10000, a=1 hour) would only rank higher than nearby posts which are extremely old (e.g. d=10km, a=1 year)


      We are trying to strike a balance between seeing things which are local enough too be relevant yet fresh. While algorithmic solutions are possible, at this point we are looking for a formula to score and sort posts. Looking for suggestions for suitable scoring formulas.







      calculus polynomials algorithms graphing-functions cauchy-integral-formula






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 24 at 20:56









      Nontech TechieNontech Techie

      1




      1






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          Have you thought of using a bounded radius instead of letting all posts show no matter how far away?



          As for a recommendation I would suggest posttimeinmilliseconds/sqrt(distance)






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:12










          • $begingroup$
            Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:30










          • $begingroup$
            Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
            $endgroup$
            – Matt Deleeuw
            Jan 24 at 21:34











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3086342%2frecommendations-for-a-scoring-formula-for-sorting-a-location-based-social-networ%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0












          $begingroup$

          Have you thought of using a bounded radius instead of letting all posts show no matter how far away?



          As for a recommendation I would suggest posttimeinmilliseconds/sqrt(distance)






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:12










          • $begingroup$
            Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:30










          • $begingroup$
            Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
            $endgroup$
            – Matt Deleeuw
            Jan 24 at 21:34
















          0












          $begingroup$

          Have you thought of using a bounded radius instead of letting all posts show no matter how far away?



          As for a recommendation I would suggest posttimeinmilliseconds/sqrt(distance)






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:12










          • $begingroup$
            Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:30










          • $begingroup$
            Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
            $endgroup$
            – Matt Deleeuw
            Jan 24 at 21:34














          0












          0








          0





          $begingroup$

          Have you thought of using a bounded radius instead of letting all posts show no matter how far away?



          As for a recommendation I would suggest posttimeinmilliseconds/sqrt(distance)






          share|cite|improve this answer











          $endgroup$



          Have you thought of using a bounded radius instead of letting all posts show no matter how far away?



          As for a recommendation I would suggest posttimeinmilliseconds/sqrt(distance)







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Jan 24 at 21:26

























          answered Jan 24 at 21:06









          Matt DeleeuwMatt Deleeuw

          113




          113












          • $begingroup$
            Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:12










          • $begingroup$
            Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:30










          • $begingroup$
            Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
            $endgroup$
            – Matt Deleeuw
            Jan 24 at 21:34


















          • $begingroup$
            Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:12










          • $begingroup$
            Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
            $endgroup$
            – Nontech Techie
            Jan 24 at 21:30










          • $begingroup$
            Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
            $endgroup$
            – Matt Deleeuw
            Jan 24 at 21:34
















          $begingroup$
          Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
          $endgroup$
          – Nontech Techie
          Jan 24 at 21:12




          $begingroup$
          Hi Matt. Had thought of that but if there is no activity in your proximity would rather show you results from slightly further off that show you nothing. Also if the only post in your vicinity is a year old (which you've probably seen multiple times) would rather show you new posts from slightly further away.
          $endgroup$
          – Nontech Techie
          Jan 24 at 21:12












          $begingroup$
          Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
          $endgroup$
          – Nontech Techie
          Jan 24 at 21:30




          $begingroup$
          Will try it out. Shouldnt the time (how long ago it was posted) be in the denominator since the lower it, the higher the score should be?
          $endgroup$
          – Nontech Techie
          Jan 24 at 21:30












          $begingroup$
          Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
          $endgroup$
          – Matt Deleeuw
          Jan 24 at 21:34




          $begingroup$
          Not if your storing it as the time in ms, if you take the difference in current time to the time it was stored yes, but using just the post time will get you more relevant results
          $endgroup$
          – Matt Deleeuw
          Jan 24 at 21:34


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3086342%2frecommendations-for-a-scoring-formula-for-sorting-a-location-based-social-networ%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mario Kart Wii

          What does “Dominus providebit” mean?

          Antonio Litta Visconti Arese