From e228e16f222fcf89205e89c3d903e1d53b6712d1 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 6 Sep 2021 00:19:37 -0500 Subject: [PATCH] hw1 --- HW1-data.csv | 21 ++++++++++++++ HW1-data.ods | Bin 0 -> 24171 bytes HW1.py | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 HW1-data.csv create mode 100644 HW1-data.ods create mode 100644 HW1.py diff --git a/HW1-data.csv b/HW1-data.csv new file mode 100644 index 0000000..866fd59 --- /dev/null +++ b/HW1-data.csv @@ -0,0 +1,21 @@ +User,"Gender (1 =F, 0=M)",260: Star Wars: Episode IV - A New Hope (1977),1210: Star Wars: Episode VI - Return of the Jedi (1983),356: Forrest Gump (1994),"318: Shawshank Redemption, The (1994)","593: Silence of the Lambs, The (1991)",3578: Gladiator (2000),1: Toy Story (1995),2028: Saving Private Ryan (1998),296: Pulp Fiction (1994),1259: Stand by Me (1986),2396: Shakespeare in Love (1998),2916: Total Recall (1990),780: Independence Day (ID4) (1996),541: Blade Runner (1982),1265: Groundhog Day (1993),"2571: Matrix, The (1999)",527: Schindler's List (1993),"2762: Sixth Sense, The (1999)",1198: Raiders of the Lost Ark (1981),34: Babe (1995) +755,0,1,5,2,,4,4,2,2,,3,2,,5,2,,4,2,5,, +5277,0,5,3,,2,4,2,1,,,4,3,2,2,,2,,5,1,3, +1577,1,,,,5,2,,4,,,1,,1,4,4,1,1,2,3,1,3 +4388,0,,3,,,,1,2,3,4,,,4,1,3,5,,5,1,1,2 +1202,1,4,3,4,1,4,1,,4,,1,5,1,,4,,3,5,5,, +3823,1,2,4,4,4,,,3,1,4,4,5,2,4,,1,,,3,,2 +5448,0,,,3,1,1,4,,5,2,,1,,,3,,1,,,5,2 +5347,0,4,,,,3,2,2,,3,,,2,3,2,4,,1,3,5, +4117,1,5,1,,4,2,4,4,4,,1,2,3,1,,5,,,,,5 +2765,0,4,2,,5,3,,4,3,4,,,,2,,,2,5,1,, +5450,1,2,1,5,,,5,5,,,,,3,2,,,1,,2,1,4 +139,0,3,5,2,,2,,2,,1,,3,,3,,2,5,,,,2 +1940,0,2,3,,5,4,,4,5,,,,2,4,,3,,,,5, +3118,1,3,,3,,2,,3,,,4,,1,2,2,3,5,1,,, +4656,1,4,4,,,5,5,2,,3,5,,1,3,,2,,3,,3,1 +4796,1,,,1,,3,2,,2,,1,5,,,,5,2,2,4,3,4 +6037,0,,,,,4,,2,,2,,2,,,,,4,,,, +3048,1,4,5,1,5,1,1,4,,5,,,,,4,,,2,1,2,5 +4790,0,5,1,,,,4,2,1,3,3,3,1,,,,2,,,, +4489,0,1,2,2,4,5,,2,3,2,2,1,,,5,5,4,3,5,3, diff --git a/HW1-data.ods b/HW1-data.ods new file mode 100644 index 0000000000000000000000000000000000000000..d4509bb5efc313263644edc1b35f3550f6146e96 GIT binary patch literal 24171 zcmeFYb8u!~w=Npnwr$(Copj8OZQD*dwmY^vwr$&Xa?`(Wf9Kp&weP;QPu=t1T~)Kz zdgnVaCf0byGsavB(!d}n000mG04T&{%E4Bg5p)0m0DseW7J#*dwTY9vor!^+ot1@= zfs=);4ZVwvF`cb}qlF`#t(}RDv8|D_wTX=roui$DiGi`BxrvFB!vE6dcQgOv!uWm? zwzV;}FmrbJr!_|=dM8_3D?KParnOK>857hR*lJh_7@$a128Q7Ru{Wp8GbFejYFmZJJ?~l>Z$-v3^|D_)O ze=qo^q`;)6r-&_bN;Y~Xn@k+rXy{3#U!dJ7M7pp%l2*WLy~F3`f?L z_NcHJQId{Im^YqKbG6g87OiouE;mu*r{muI3@pl_YIC)r;?zqCre%k*nySyIa7(}A zk?$btS>UjjfEjFvfq=w|7P5HQ_rl_w+=Vn%S9ChdjdOn@;EmkiD$A{dGH6oj3~eHa z_ZNtUlo<_j3dCuXlOAABxl`oq$-CGc((jxL%;(X+rjD6f-VB2&KG5Cnthv+)-115` z_qa6jaGo2u*&P zGM@zn1ONyG1_1ciJMf=P-#>4oiIV}Ho3&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AN6HJt1%L zS&Eg`^(VnUIodkGJT0F?6YQ447DPj9iNFFJX3;T7(f;oE4Ajt_Yd`&;|Lk?{lJ5pO zXXhHg;olvef4}!xuOBu%XXioxfpX^f{C`Dx`yVK04$yx`Idx<{YrDYVpHFn&5&G{q zr=HMfjT0zf{1fMQhv>f}{XU{c|ABPgG5YT~zmMq6f8hM?ApLiw-$(T6KakElO8*__ z)KmJbUB>v|ztR74nEnCwvjX(Iee$XG;8{}!zV&Grh6tT{G{QlYRyc^Z;;}il;&l@KG?D;phs$VxmTe$pp@2a0D zKcDt|4ee=l@>#om<1e+!e?pvpkDM0Up0#57-%4*)= 4).sum() / s.count()).sort_values(ascending=False)[:3]) +print() + +print("Response 4: %correlation with Toy Story") +toy_story_raters = movie_data.transpose().loc[TOY_STORY] +toy_story_raters_n = toy_story_raters.notna() +def toy_story_correlate(s): + xy = 0 + for i, v in s.notna().items(): + if toy_story_raters_n[i] and v: + xy += 1 + x = toy_story_raters.count() + return xy/x +print(movie_data.apply(toy_story_correlate).sort_values(ascending=False)[:5]) +print() + +print("Response 5: correlation with Toy Story") +def toy_story_correlate2(s): + return correl(s, toy_story_raters) +print(movie_data.apply(toy_story_correlate2).sort_values(ascending=False)) +print("TODO NOT DONE") +print() + +print("Response 6: Mean difference by gender") +isman = lambda id: not gender_data[id] +iswoman = lambda id: gender_data[id] +def gender_rating(g, s): + v = pd.Series(map(lambda c: c[1], filter(lambda c: gender_data[users[c[0]]] == g, s.items()))) + return v.mean() +men_ratings = movie_data.apply(functools.partial(gender_rating, 0)) +women_ratings = movie_data.apply(functools.partial(gender_rating, 1)) +print(men_ratings, women_ratings)