You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dampen the trend score for items with few subscriptions #148
calculate_relative_wma in src/domain/items.rs:114 uses relative change: (new - old) / max(old, 1). An item that goes from 2 to 20 subscriptions gets a change of 9.0. An item that goes from 100000 to 110000 gets 0.1. Small items fill the trending list.
The current workaround in calculate_wma (src/domain/items.rs:106) returns 0 when the history is shorter than the period. That hides new items, but does not fix small, old items.
Proposal: multiply the relative change by an activation function of the subscription count, so that the weight is near 0 for small items and near 1 for large items. Options:
Sigmoid on log10(subs): 1 / (1 + exp(-k * (log10(subs) - m))). m sets the midpoint (for example 3, which is 1000 subscriptions), k sets the steepness.
1 - exp(-subs / c), which is simpler, with one constant.
Bayesian smoothing: add a prior to the denominator, (new - old) / (old + c). This is one change in calculate_relative_wma and needs no new function.
Recommendation: try the prior first. It is the smallest change and directly limits the change from tiny counts.
Notes:
The midpoint must be per app. 1000 subscriptions is large for a small game and small for RimWorld. Consider the median subscriptions of the app.
After the change, the zero-on-short-history workaround can possibly go.
The scores are written on each item update (src/application/items_service.rs:90), so old scores stay until the item is processed again.
Activity