html - Choose font sizes for tag cloud (rails3) -


i set font sizes tags based on rating. sample ratings like:

206 82 25 24 25 19 8 5 0 3 2 1 6 1 1 0 32 6 3 -1 112 31 6 8 2 24 18 2 2 1 1 1 2 6 67 35 37 25 0 1 7 8 2 3 0 1 2 1 -2 8 19 -2 1 1 -3 -4 6 1 1 8 11 3 1 3 1 2 5 1 0 1 1 2 2 2 1 2 2 1 1 1 1 1 0 1 1 2 1 2 1 1 0 1 1 2 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 -1 0 1 -1 -1 1 -1 -1 0 -5 -1 2 2 

i've tried using k-means clustering (gem) can't seem pick right number of centroids because ratings vary case case. also, i'm not sure font range use. what's best way this?

here find algorithm font sizes using logarithmic scaling based on number of occurrences of each tag: http://blogs.dekoh.com/dev/2007/10/29/choosing-a-good-font-size-variation-algorithm-for-your-tag-cloud/


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -