making_recommendation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| making_recommendation [2016/05/17 07:07] – hkimscil | making_recommendation [2017/03/13 13:25] (current) – hkimscil | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{:class: | + | {{c: |
| + | {{0y100685.pdf|상관관계를 이용한 recommendation system 예}} | ||
| Python 실행 | Python 실행 | ||
| <code py> | <code py> | ||
| Line 74: | Line 75: | ||
| similarity between two users. | similarity between two users. | ||
| + | __for python 2.x__ | ||
| < | < | ||
| >>> | >>> | ||
| Line 81: | Line 82: | ||
| </ | </ | ||
| - | for python 3.xx | + | //for python 3.xx// |
| < | < | ||
| imp.reload(recommendations) | imp.reload(recommendations) | ||
| Line 127: | Line 128: | ||
| < | < | ||
| - | >>> | + | >>> |
| - | ... 'Lisa Rose',' | + | >>> |
| + | >>> | ||
| 0.396059017191 | 0.396059017191 | ||
| </ | </ | ||
| Line 146: | Line 148: | ||
| < | < | ||
| - | >> recommendations.topMatches(recommendations.critics,' | + | >> recommendations.topMatches(recommendations.critics,' |
| - | [(0.99124070716192991, | + | [(0.99124070716192991, |
| - | (0.89340514744156474, | + | LaSalle' |
| </ | </ | ||
| - | |||
| - | |||
| ^ Critic | ^ Critic | ||
| Line 197: | Line 197: | ||
| < | < | ||
| - | >>> | + | >>> |
| - | [(3.3477895267131013, | + | [(3.3477895267131013, |
| - | Water' | + | >>> |
| - | >>> | + | [(3.5002478401415877, |
| - | ... similarity=recommendations.sim_distance) | + | |
| - | [(3.5002478401415877, | + | |
| - | Water' | + | |
| </ | </ | ||
| Line 363: | Line 360: | ||
| c+=1 | c+=1 | ||
| if c%100==0: print "%d / %d" % (c, | if c%100==0: print "%d / %d" % (c, | ||
| + | # for python3.4 윗줄을 아랫줄로 대체 | ||
| + | # if c%100==0: print ("%d / %d" % (c, | ||
| # Find the most similar items to this one | # Find the most similar items to this one | ||
| scores=topMatches(itemPrefs, | scores=topMatches(itemPrefs, | ||
making_recommendation.1463436442.txt.gz · Last modified: by hkimscil
