# Convert a linear function into a logarithmic scale from o-100

I have millions of scores which range from 0.015 to 244660.58, but I'd like to score them on a scale from 0-100.

I came up with a y=m(x)+b linear formula, but most of the scores did not turn out right. The second highest score got a grade of 16 and everything else got a grade < 1. I did not feel it represented the data well:

y=0.000408729764760079(X) + (-0.0000613094647140119)


Eventually, I looked into turning this into a log function and I ended up with this formula (after playing around with wolfram alpha):

Y=(0.15)*(log(X,6))


This is a reasonable equation, but I'm still finding, however, that it's not representing the scoring correctly.

The problem in my dataset is that most of the scores are greater than 0.15 but less than 1, and the above equation returns -0.04236893409, for example, for a value like x=0.60284233.

How can I correctly turn my linear function into a log function? How can I better represent than the millions of rows which are less than 1? Any feedback is greatly appreciated.

• 1) why the "linear algebra" tag? – VictorZurkowski Apr 4 '17 at 4:48
• sorry for the mix up ... I'm new to the math stack exchange. I'm going to remove it, can you think of a more relevant one instead? – 24x7 Apr 4 '17 at 4:51
• @24x7 if most of the scores are in the range $[0.15,1]$ you might consider a $[0,100]$ scale for the range $[0.15,1]$ and everything over $1$ could be considered to be $100$. If the percentage of elements over $1$ is in very small in comparison to the rest, the weight of this truncation might be insignificant. But of course it depends on the meaning of the data. – iadvd Apr 4 '17 at 4:53
• Reading between the lines, it seems that what you seek is a transformation of your data so that the transformed numbers are (close to) uniformly distributed. If that is correct, unfortunately there are no analytic formula that will do the job that works for general data sets. – VictorZurkowski Apr 4 '17 at 4:53
• I am trying to rank this dataset (about.commonsearch.org/2016/07/…), most domains are not as avidly linked to as Facebook (100), but several small ones do deserve a score even if it is minor like (3 or 4). – 24x7 Apr 4 '17 at 5:05