Skip to content

Instantly share code, notes, and snippets.

@deansublett
Created June 5, 2019 17:46
Show Gist options
  • Save deansublett/1ae9d38e0186a5f0a304377cbbddcd06 to your computer and use it in GitHub Desktop.
Save deansublett/1ae9d38e0186a5f0a304377cbbddcd06 to your computer and use it in GitHub Desktop.
V = movies_clean['vote_count']
R = movies_clean['vote_average']
C = movies_clean['vote_average'].mean()
m = movies_clean['vote_count'].quantile(0.70)
movies_clean['weighted_average'] = (V/(V+m) * R) + (m/(m+V) * C)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment