In this project we will be working with a fake advertising data set, indicating whether or not a particular internet user clicked on an Advertisement. We will try to create a model that will predict whether or not they will click on an ad based off the features of that user.
This data set contains the following features:
Import a few libraries you think you'll need (Or just import them as you go along!)
In [38]:
In [39]:
Check the head of ad_data
In [40]:
Out[40]:
Use info and describe() on ad_data
In [41]:
In [42]:
Out[42]:
In [48]:
Out[48]:
Create a jointplot showing Area Income versus Age.
In [64]:
Out[64]:
Create a jointplot showing the kde distributions of Daily Time spent on site vs. Age.
In [66]:
Create a jointplot of 'Daily Time Spent on Site' vs. 'Daily Internet Usage'
In [72]:
Out[72]:
Finally, create a pairplot with the hue defined by the 'Clicked on Ad' column feature.
In [84]:
Out[84]:
Split the data into training set and testing set using train_test_split
In [85]:
In [88]:
In [89]:
Train and fit a logistic regression model on the training set.
In [91]:
In [92]:
Out[92]:
In [94]:
Create a classification report for the model.
In [95]:
In [96]: