Wednesday, January 21, 2009

Data Mining

This journey into the world of python-- I am beginning to understand python, the mining portion I more less understand. Trying to figure out how to match up an question with an answer.
I found these answers to the aforementioned

from recommendations import critics
>>> critics ['Lisa Rose']['Lady in the Water']
>>> criticx ['Toby']['Snakes on a Plane']=4.5

NameError: name 'criticx' is not defined
>>> critics ['Toby']['Snakes on a Plane']=4.5
>>> critics ['Toby']
{'Snakes on a Plane': 4.5, 'You, Me, and Dupree': 1.0, 'Superman Returns': 4.0}

from math import sqrt
>>> sqrt (pow(4.5-4,2)+pow(1-2,2))
>>> 1/(1+sqrt(pow(4.5-4,2)+pow(1-2,2)))

(3.3477895267131013, 'The Night Listener'), (2.8325499182641614, 'Lady in the Water'), (2.5309807037655649, 'Just My Luck')]

(3.457128694491423, 'The Night Listener'), (2.7785840038149234, 'Lady in the Water'), (2.5502787061890753, 'Just My Luck')]

[(0, 'You, Me, and Dupree'), (0, 'The Night Listener'), (0, 'Snakes on a Plane'), (0, 'Lady in the Water'), (0, 'Just My Luck')]

These are my answers, I feel there is much more to learn about this, and will prove to a useful skill set in the years to come.

No comments: