my code

will click the ad or not

Snippet options

Download: Download snippet as
Copy snippet: For this you need a free my code account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')

# In[2]:


# In[3]:


# In[4]:

# In[42]:


sns.jointplot(x="Area Income",y="Age",data=data)

# In[64]:

sns.jointplot(x='Age',y='Daily Time Spent on Site',data=data,color='red',kind='kde');

# # Logistic Regression

X = data[['Daily Time Spent on Site', 'Age', 'Area Income','Daily Internet Usage', 'Male']]

# In[52]:

y=data["Clicked on Ad"]

# In[76]:

from sklearn.model_selection import train_test_split
X_train,X_test,y_train,y_test=train_test_split(X,y, test_size=0.3, random_state=100)

# In[77]:

from sklearn.linear_model import LogisticRegression

# In[78]:


# In[79]:


# In[80]:

from sklearn.metrics import classification_report


Create a free my code account now.

my code is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.