What you desire is stunning easy to achieve. You have to kinds of data, that your are interested in: increasing and decreasing data. Increasing data is considered as "good", well, as long as it increases. Decreasing data is considered as "better" the nearer it is to zero.
It turns out that all of the four datasets are simple integers:
increasing data
- shares: positive integer
s \in N_0
(every integer from zero to infinity)
- retweets: positive integer
r \in N_0
decreasing data
For decreasing data you want to use the absolute value as a metric:
- Let
t_0
be the timestamp (unix or so) of the article.
- Let
T
be the current timestamp.
- Let
l_0
denote the length of an article considered as "best".
- Let
L
denote the actual length of the article.
Then:
- time:
|t_0 - T|
the better the nearer to zero
- length:
|l_0 - L|
the better the nearer to zero
since the absolute value are positive integers it follows:
|l_0 - L| + |t_0 - T|
is nearer to zero as |t_0 - T|
and |l_0 - L|
are nearer to zero.
The same is true for the increasing numbers.
So, the more likely an article is to be of the "correct" length and new, the nearer this number is to zero.
conclusion
the quotient of an increasing number over a decreasing is itself increasing. Think about it: the smaller the denominator the bigger the quotient. The bigger the numerator the bigger the quotient.
That means: If considered as "better" the quotient
(s+r) / (|l_0 - L| + |t_0 - T|)
rises.
This is not necessarily an integer anymore.
Enhancement
You can soften the rise of shares and retweets, so the score becomes little more "natural" by using ln
.
ln(s+r) / (|l_0 - L| + |t_0 - T|)
You could use exp
to soften the denominator:
ln(s+r) / exp(-(|l_0 - L| + |t_0 - T|))