0% found this document useful (0 votes)
68 views

10 Recommendation Engine Problem Statement

The document discusses building a recommender system using a dataset from the video gaming industry. It provides instructions on data pre-processing, exploratory data analysis, model building, and discussing business benefits. Key steps include data cleaning, EDA to find top games, building a recommendation model using UBCF, and insights about recommended games.

Uploaded by

Sukhwinder Kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

10 Recommendation Engine Problem Statement

The document discusses building a recommender system using a dataset from the video gaming industry. It provides instructions on data pre-processing, exploratory data analysis, model building, and discussing business benefits. Key steps include data cleaning, EDA to find top games, building a recommendation model using UBCF, and insights about recommended games.

Uploaded by

Sukhwinder Kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Topic: Recommendation Engine

Instructions:
Please share your answers filled in-line in the word document. Submit code
separately wherever applicable.

Please ensure you update all the details:


Name: KAMRAN ANSARI Batch ID: DSWDEOD 230322
Topic: Recommender Engine
Hints:
1. Business Problem
1.1. What is the business objective?
1.1. Are there any constraints?

2. Work on each feature of the dataset to create a data dictionary as displayed in


the image below:

3. Data Pre-processing
2.1 Data Cleaning and Data Mining.
4. Exploratory Data Analysis (EDA):
4.1. Summary.
4.2. Univariate analysis.
4.3. Bivariate analysis.

5. Model Building
5.1 Build the Recommender Engine model on the given data sets.

6. Write about the benefits/impact of the solution - in what way does the
business (client) benefit from the solution provided?

Problem Statement: -
© 2013 - 2021 360DigiTMG. All Rights Reserved.
Q) Build a recommender system with the given data using UBCF.

This dataset is related to the video gaming industry and a survey was conducted to build a
recommendation engine so that the store can improve the sales of its gaming DVDs. Snapshot of
the dataset is given below. Build a Recommendation Engine and suggest top selling DVDs to the
store customers.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('white')
%matplotlib inline
a=pd.read_csv(r"D:\game.csv")
a.head()

z=a.groupby('game')['rating'].mean().sort_values(ascending=False).head()
z1=a.groupby('game')['rating'].count().sort_values(ascending=False).head()

ratings= pd.DataFrame(a.groupby('game')['rating'].mean())
#add No of ratings column
ratings['num of ratings']=pd.DataFrame(a.groupby('game')['rating'].count())

plt.figure(figsize=(10,5))
ratings['num of ratings'].hist(bins=5)

© 2013 - 2021 360DigiTMG. All Rights Reserved.


plt.figure(figsize=(10,5))
ratings['rating'].hist(bins=5)

sns.jointplot(x='rating',y='num of ratings',data=ratings,alpha=0.5)

© 2013 - 2021 360DigiTMG. All Rights Reserved.


gamemat=a.pivot_table(index='userId',columns='game',values='rating')
gamemat.head()
ratings.sort_values('num of ratings',ascending=False).head(25)
TOP_GAME=gamemat['Marvel: Ultimate Alliance']
TOP_GAME.head()

Similar_to_TOP_GAME=gamemat.corrwith(TOP_GAME)
corr_TOP_GAME=pd.DataFrame(Similar_to_TOP_GAME,columns=['Correlatoion'])
corr_TOP_GAME.dropna(inplace=True)
corr_TOP_GAME.head(10)

INSIGHTS FROM DATA:


A)Mostly rated games (Recommendation):

© 2013 - 2021 360DigiTMG. All Rights Reserved.


B)Highly Rated Games(Top 25) Recommendation:

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Problem Statement: -

The Entertainment Company, which is an online movie watching platform, wants to improve its
collection of movies and showcase those that are highly rated and recommend those movies to
its customer by their movie watching footprint. For this, the company has collected the data and
shared it with you to provide some analytical insights and also to come up with a

© 2013 - 2021 360DigiTMG. All Rights Reserved.


recommendation algorithm so that it can automate its process for effective recommendations.
The ratings are between -9 and +9.

Ans:
Note:There is One correction in data set,some of movies ratings
is 99 in data set. But in question Clearly Mention that rating lies
between 9 to -9. Question solved by taking 99 as 9.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('white')
%matplotlib inline
a=pd.read_csv(r"D:\Entertainment.csv")
a.head()

z=a.groupby('Titles')['Reviews'].mean().sort_values(ascending=False).head()
z1=a.groupby('Titles')['Reviews'].count().sort_values(ascending=False).head()

ratings= pd.DataFrame(a.groupby('Titles')['Reviews'].mean())
#add No of ratings column
© 2013 - 2021 360DigiTMG. All Rights Reserved.
ratings['num of ratings']=pd.DataFrame(a.groupby('Titles')['Reviews'].count())

plt.figure(figsize=(10,5))
ratings['num of ratings'].hist(bins=5)

plt.figure(figsize=(10,5))
ratings['Reviews'].hist(bins=5)

sns.jointplot(x='Reviews',y='num of ratings',data=ratings,alpha=0.5)

© 2013 - 2021 360DigiTMG. All Rights Reserved.


moviemat=a.pivot_table(index='Id',columns='Titles',values='Reviews')
moviemat.head()
K=ratings.sort_values('num of ratings',ascending=False).head(10)

Insights from data:


a)Top 10 Most liked Movies:

© 2013 - 2021 360DigiTMG. All Rights Reserved.


Top_Movie=moviemat['Ace Ventura: When Nature Calls (1995)']
Top_Movie.head()

Similar_to_Top_Movie=moviemat.corrwith(Top_Movie)
corr_Top_Movie=pd.DataFrame(Similar_to_Top_Movie,columns=['Correlatoion'])
corr_Top_Movie.dropna(inplace=True)
corr_Top_Movie.head(10)

© 2013 - 2021 360DigiTMG. All Rights Reserved.

You might also like