Mathmatics I've been reading whenever I can from http://planetmath.org/, which has become one of my reference bookmarks.
Python This could probably use some casting or perhaps use of the Number classes, but I'm not sure that I like how IMDB calculates their ranks anymore after playing with the formula.
def weighted_rank(v,R,m,C): """From http://us.imdb.com/top_250_films : The formula for calculating the top 250 films gives a true Bayesian estimate: weighted rank (WR) = (v / (v+m)) * R + (m / (v+m)) * C where: R = average for the movie (mean) = (Rating) v = number of votes for the movie = (votes) m = minimum votes required to be listed in the top 250 (currently 1250) C = the mean vote across the whole report (currently 6.9) """ return (v / ( v + m ) ) * R + ( m / ( v + m ) ) * C;
I played with this shortly after reading a little bit about the Advogato diary ranking system, hence also the interest in the PlanetMath site to understand Eigenvectors. At the moment I don't understand them well enough to compare to the IMDB estimate of rank.