Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

test_recommendation_system.py 549 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. from recommendation_system import RecommendationSystem
  2. import pandas as pd
  3. def main():
  4. df = pd.read_csv('https://github.com/Ojas1804/ml-algorithms/blob/main/Movie_Recommendation_System/tmdb_5000_movies.csv')
  5. df['profit'] = df['revenue'] - df['budget']
  6. df.drop(['homepage', 'id', 'status', 'tagline', 'vote_count', 'revenue'], axis = 1, inplace = True)
  7. movie_recommender = RecommendationSystem(df)
  8. movie_list = movie_recommender.get_recommendations('Man of Steel', 5)
  9. print(movie_list)
  10. if __name__=='__main__':
  11. main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...