forked from bc3527/Netflix-Rating-Prediction-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Netflix.html
45 lines (42 loc) · 4.07 KB
/
Netflix.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module Netflix</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>Netflix</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/v/filer4b/v38q001/bc3527/Project_3_Netflix/Netflix.py">/v/filer4b/v38q001/bc3527/Project_3_Netflix/Netflix.py</a></font></td></tr></table>
<p><tt>#!/usr/bin/env python</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-netflix_average_rating"><strong>netflix_average_rating</strong></a>(user_cache)</dt><dd><tt>Returns the average overall rating made by any user<br>
user_cache is a dictionary that contains the average of all user_cache ratings</tt></dd></dl>
<dl><dt><a name="-netflix_eval"><strong>netflix_eval</strong></a>(r, w, avg_rating, user_cache, movie_cache)</dt><dd><tt>reads input file and makes a predicted rating of movies<br>
and then writes them to a file<br>
user_cache is a cache containing user_cache average rating<br>
movie_cache is a cache containing average ratings for each movie<br>
r is a reader<br>
w is a writer<br>
avg_rating is the overall average rating</tt></dd></dl>
<dl><dt><a name="-netflix_movie_cache"><strong>netflix_movie_cache</strong></a>(movie_cache)</dt><dd><tt>Creates a cache containing movies average ratings<br>
movie_cache is a dictionary containing nothing at first and all <br>
the movie data at the end</tt></dd></dl>
<dl><dt><a name="-netflix_movie_offset"><strong>netflix_movie_offset</strong></a>(avg_rating, movie_rating)</dt><dd><tt>returns offset from overall average rating and this movies average rating<br>
avg_rating is the overall average rating<br>
movie_rating is the average rating for this movie</tt></dd></dl>
<dl><dt><a name="-netflix_start"><strong>netflix_start</strong></a>(r, w)</dt><dd><tt>calls methods to create average rating and creates user<br>
and movie caches from files then calls eval<br>
r is a reader<br>
w is a writer</tt></dd></dl>
<dl><dt><a name="-netflix_user_cache"><strong>netflix_user_cache</strong></a>(user_cache)</dt><dd><tt>Creates a cache containing users average ratings<br>
user_cache is a dict containing nothing at first and all the avg user data at the end</tt></dd></dl>
<dl><dt><a name="-netflix_user_offset"><strong>netflix_user_offset</strong></a>(avg_rating, user_rating)</dt><dd><tt>returns offset from average user rating and this movies average rating<br>
user_rating is the average rating for this user<br>
movie_rating is the average rating for this movie</tt></dd></dl>
</td></tr></table>
</body></html>