discourse: tweak default weights

This commit changes the Discourse default weights around, mostly
significantly moving many weights (e.g. LIKES) that have a 0 backward
weight to have a small positive backward weight instead, like 1/16. In
practice, this mitigates an issue where users with few outbound edges
act as "cred sinks" because the cred gets stuck in a loop between the
user and content they've authored.

Test plan: In local experimentation, I've found the new weights produce
more reasonable-seeming cred attribution.
This commit is contained in:
Dandelion Mané 2019-08-18 15:47:21 +02:00
parent 0d6e868324
commit bf5c3a953b
1 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ export const topicContainsPostEdgeType: EdgeType = deepFreeze({
"discourse", "discourse",
"topicContainsPost", "topicContainsPost",
]), ]),
defaultWeight: {forwards: 0, backwards: 1}, defaultWeight: {forwards: 1 / 16, backwards: 1 / 4},
description: "Connects a topic to the posts that it contains.", description: "Connects a topic to the posts that it contains.",
}); });
@ -46,7 +46,7 @@ export const postRepliesEdgeType: EdgeType = deepFreeze({
forwardName: "post is reply to", forwardName: "post is reply to",
backwardName: "post replied to by", backwardName: "post replied to by",
prefix: EdgeAddress.fromParts(["sourcecred", "discourse", "replyTo"]), prefix: EdgeAddress.fromParts(["sourcecred", "discourse", "replyTo"]),
defaultWeight: {forwards: 1, backwards: 0}, defaultWeight: {forwards: 1, backwards: 1 / 16},
description: "Connects a post to the post that it is a reply to.", description: "Connects a post to the post that it is a reply to.",
}); });
@ -59,7 +59,7 @@ export const authorsTopicEdgeType: EdgeType = deepFreeze({
"authors", "authors",
"topic", "topic",
]), ]),
defaultWeight: {forwards: 0.5, backwards: 1}, defaultWeight: {forwards: 1 / 4, backwards: 1},
description: "Connects an author to a topic they created.", description: "Connects an author to a topic they created.",
}); });
@ -67,7 +67,7 @@ export const authorsPostEdgeType: EdgeType = deepFreeze({
forwardName: "authors post", forwardName: "authors post",
backwardName: "post is authored by", backwardName: "post is authored by",
prefix: EdgeAddress.fromParts(["sourcecred", "discourse", "authors", "post"]), prefix: EdgeAddress.fromParts(["sourcecred", "discourse", "authors", "post"]),
defaultWeight: {forwards: 0.5, backwards: 1}, defaultWeight: {forwards: 1 / 4, backwards: 1},
description: "Connects an author to a post they've created.", description: "Connects an author to a post they've created.",
}); });
@ -75,7 +75,7 @@ export const likesEdgeType: EdgeType = deepFreeze({
forwardName: "likes", forwardName: "likes",
backwardName: "is liked by", backwardName: "is liked by",
prefix: EdgeAddress.fromParts(["sourcecred", "discourse", "likes"]), prefix: EdgeAddress.fromParts(["sourcecred", "discourse", "likes"]),
defaultWeight: {forwards: 1, backwards: 0}, defaultWeight: {forwards: 1, backwards: 1 / 16},
description: "Connects a Discourse user to a post they liked.", description: "Connects a Discourse user to a post they liked.",
}); });