200160116031
Practical-1
Aim: Find Mean, Median, Mode, Standard Deviation,
Skewness and Kurtosis for above student data in excel.
Solution:
pg.
200160116031
Practical-2
Aim: Find Mean, Median, Mode, Standard Deviation,
Skewness and Kurtosis for above student data in Python.
Solution:
Code-
import numpy as np
from scipy import stats as st
from [Link] import skew
from [Link] import kurtosis
Lovesh = [78, 67, 76, 91]
print("\nmean of Lovesh : ", [Link](Lovesh))
print("\nmedian of Lovesh : ", [Link](Lovesh))
data = [Link]([78, 67, 76, 91])
print("\nMode of Lovesh :", [Link](data))
print("\nSkewness of Lovesh :")
print(skew(Lovesh, bias=False))
Output-
pg.
200160116031
Practical-3
Aim: Draw the following graphs:
Plot the graph showing result of student in each
semester.
Plot the graph showing the geographical location of
students.
Plot the graph showing number of male and female
students.
Solution:
Code-
import [Link] as plt
import pandas as pd
import numpy as np
import scipy as sp
data = { 'Sem1' : 7.4, 'Sem2': 5.9, 'Sem3' : 8.3, 'Sem4' : 8.5 }
Sem = list([Link]())
Result = list([Link]())
fig = [Link](figsize = (10,5))
[Link](Sem, Result, color ='maroon', width = 0.4 )
[Link]("Semester")
[Link]("Result of student in sem")
[Link]("Result of stuent in 4 semesters")
[Link]()
pg.
200160116031
Output-
Plot the graph showing the geographical location of
students.
Code-
import [Link] as plt
import pandas as pd
import numpy as np
import scipy as sp
y = [Link]([75, 12.5, 12.5, 0])
mycitys = ["Vapi" , "Navsari", "Surat", "Ahmedabad",]
fig = [Link](figsize = (10,7))
[Link](y, labels = mycitys )
[Link]()
pg.
200160116031
Output-
Plot the graph showing number of male and female
students.
Code-
import [Link] as plt
import pandas as pd
import numpy as np
import scipy as sp
data = { 'Male' : 4, 'Female' : 1}
Gender = list([Link]())
Result = list([Link]())
fig = [Link](figsize = (10,5))
pg.
200160116031
[Link](Gender, Result, color ='maroon', width = 0.3 )
[Link]("Gender in male and female")
[Link]("No of male and female")
[Link]("plotting map on male and female")
[Link]()
Output-
pg.
200160116031
Practical-4
Aim: Implement a method to treat missing value for gender
and missing value for marks.
Solution-
Code-
pg.
200160116031
Practical-5
Aim: Implement linear regression to predict the 5th semester
result of student.
Implement logistic regression and decision tree to classify the
student as average or clever.
Solution-
Code-
import numpy as np
import pandas as pd
import [Link] as px
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
data=pd.read_csv("[Link]
nkharwal/Website-data/master/Student_Marks.csv")
print([Link](10))
print([Link]().sum())
pg.
200160116031
data["number_courses"].value_counts()
figure = [Link](data_frame=data, x = "number_courses",
y = "Marks", size = "time_study", title="Number of Courses
and Marks Scored")
[Link]()
figure = [Link](data_frame=data, x = "time_study", y =
"Marks", size = "number_courses", title="Time Spent and
Marks Scored", trendline="ols")
[Link]()
pg.
200160116031
correlation = [Link]()
print(correlation["Marks"].sort_values(ascending=False))
x = [Link](data[["time_study", "number_courses"]])
y = [Link](data["Marks"])
xtrain, xtest, ytrain, ytest = train_test_split(x, y, test_size=0.2,
random_state=42)
model = LinearRegression()
[Link](xtrain, ytrain)
[Link](xtest, ytest)
# Features = [["time_study", "number_courses"]]
features = [Link]([[4.508, 3]])
[Link](features)
pg.
200160116031
Project: Real time application building using data science.
Project - “ Netflix Recommendation system “
Code-
pg.
200160116031
Content based NRC:
pg.
200160116031
pg.
200160116031
Output:
# Flask-Netflix-Recommendation-System:
A flask web-app which can be used to get recommendations for a
tv-show/movie, the app recommends a list of media according to
the input.
# Screenshot 1 : Main Page:
Here the user can enter their movie of choice, for example I
have entered La Casa De Papel a Spanish Netflix original show.
pg.
200160116031
# Screenshot 2 : Recommendation Page:
Here the user will get recommendations, for example I recieved
Elite(another spanish Netflix original) as my top
recommendation.
Conclusion:
Netflix recommendation system is a real time application built using
python which helps user recommend and find movies which have
common subject and user’s interest.
By searching one movie this system shows recommendation list of
similar movies and web series to user
pg.