• Steven Allen's avatar
    engine: tag peers based on usefulness · 9d580a65
    Steven Allen authored
    This patch tracks two usefulness metrics: short-term usefulness and long-term
    usefulness. Short-term usefulness is sampled frequently and highly weights new
    observations. Long-term usefulness is sampled less frequently and highly weights
    on long-term trends.
    
    In practice, we do this by keeping two EWMAs. If we see an interaction within
    the sampling period, we record the score, otherwise, we record a 0. The
    short-term one has a high alpha and is sampled every shortTerm period. The
    long-term one has a low alpha and is sampled every longTermRatio*shortTerm
    period.
    
    To calculate the final score, we sum the short-term and long-term scores then
    adjust it ±25% based on our debt ratio. Peers that have historically been more
    useful to us than we are to them get the highest score.
    9d580a65
ewma.go 99 Bytes