Skip to content

Commit

Permalink
重みを調節
Browse files Browse the repository at this point in the history
  • Loading branch information
eatski committed Apr 9, 2024
1 parent a14cce7 commit 3c924f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/services/story/ranking/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ export const getStoriesRecommended = async (
(story.publishedAt ? now - story.publishedAt.getTime() : 0) + ONE_DAY;

const score =
((Math.pow(correctSolutionsLength, 0.5) + 1) *
Math.pow(Math.max(total, 0) + 1, 0.8) *
(Math.pow(questionLogsLength, 0.5) + 1) *
((Math.pow(Math.max(correctSolutionsLength, 1), 0.6) + 1) *
Math.pow(Math.max(total, 1), 0.9) *
Math.pow(Math.max(questionLogsLength, 1), 0.3) *
Math.pow(questionExamplesLength + 1, 0.3) *
Math.pow(Math.random(), 2)) /
Math.pow(Math.random(), 2.2)) /
Math.pow(timeFromPublished, 0.5);

return {
Expand Down

0 comments on commit 3c924f8

Please sign in to comment.