Penalizing small values

675 Views Asked by At

I have the recency of each people of a given website computed as the number of days since last connexion.

0 for people who connected the same day of the analysis ... 25 for people who connected 25 days ago and are inactive since then.

Now I want to add recency with other factors such as frequency, etc... to compute a global activity score. But I also want to penalize inactivity before adding the recency score to the others.

People with a recency of 0 are strongly active, people with recency of 25 are inactive and a penalty should be applied to them.

So:

  • I want to transform recency number into a score. The largest value should be the most recent, the smallest value should be the least recent.
  • I want to penalize the smallest scores

I thought of something like:

  • 1/(1+recency) for converting recency days into scores
  • and applying a log function to penalize small numbers

I'm not sure what is the best way to get what I want and what makes sense.

1

There are 1 best solutions below

0
On

You have to decide what you want-there is a function to do that. If $r$ is recency, the simplest is to subtract $r$ from the score. If that is too big a penalty, subtract $ar$ for some constant $a$. Is $r=3$ lots worse than $r=1?$ How about $r=25$ compared to $r=5$? As you say, you can just add $\frac 1{a+r}$ to all your scores. As $a$ grows, the variation decreases. You can also subtract $\log r$. These are all monotonically decreasing with $r$. Since you haven't said what you want beyond that, I can't suggest one over the other.