# How can I normalize a set of numbers that's scale keeps changing?

I'm pretty weak at math so sorry in advance if I'm not describing this correctly(or the premise is totally off). Basically I'm working on a pet project to make inferences on graphs. Part of the inference is to study the data within the nodes itself(its domain specific so I won't bore you with the details) and also studying the structure of the graph itself(these nodes are interrelated so its a directed graph for a set of nodes for each day to connect to the next days set of nodes). I'm trying to take the average of domain specifics factors I'm studying and then combine them with the pagerank score to get a score that balances both the domain specific factors and the structure.

My problem is sometimes the pagerank scores are large such as .02 but can go as low as 0.0002(or lower). The problem is if my domain scores are in a range 0-1.0 then a adding a score of .5 to 0.0002 won't make much of a difference in the score and thus the pagerank of the graph it not getting its fair weight.

I can easily control the domain specific scores because I'm creating the score but the pagerank is being generated by another application(networkx, its a python library). I thought of increasing the number by using a multiplier based on the 0's after the decimal but wasn't sure if that was the best approach.

Again, I'm sorry if I'm not explaining my problem clearly. If I can add anything please let me know. I'm willing to learn or study anything if this is too broad of a question(just let me know what I need to look up).

Thanks!

-
Pagerank values are normalized, which means they sum to one. Your domain scores are not. Did you try normalizing those (dividing by the sum of all domain scores)? – Jacopo Notarstefano Jan 26 '12 at 21:48
Interesting, thank you. I didn't realize pagerank sums to one(which would explain why they keep getting smaller). I'll test normalizing the domain scores, but maybe it'll be easier to just take the pagerank scores for that day and normalize those(so I don't have to deal with smaller and smaller numbers). I'll play around, thank you so much Jacopo. – Lostsoul Jan 26 '12 at 21:51

You say that you're considering something like "using a multiplier based on the 0's after the decimal", which sounds pretty reasonable. Taking the logarithm of the pagerank would work just fine for that: the more 0's after the decimal point, the more negative the log is.

$ln(.02) = -3.91...$

$ln(.0002) = -8.52...$

You can change how much this affects the weight with whatever multiplier you want, e.g. taking something like 5*log(pagerank)+domain.

-