Linear Regression - Project

E commerce company based in New York City that sells clothing online but they also have in-store style and clothing advice sessions. 



Customers come in to the store, have sessions/meetings with a personal stylist, then they can go home and order either on a mobile app or website for the clothes they want.

The company is trying to decide whether to focus their efforts on their mobile app experience or their website.(it's fake data. it's not real credit card numbers or emails)

--------------------------------------------------------------------------------------------------------------------------


GET THE DATA 





First of all I will import libraries that I need to use in this project, then I will import data set to my jupyter notebook.



Next, I will Check the head of customers, and check out its info() and describe() methods








Exploratory Data Analysis

I will use seaborn to create a jointplot to compare the Time on Website and Yearly Amount Spent columns. Does the correlation make sense?






Next, I will find relationships across the entire data set by using pairplot




Based off this plot it looks like Length of Membership is the most correlated feature with Yearly Amount Spent


Training and Testing Data

Now that I've explored the data a bit, let's go ahead and split the data into training and testing sets. Set a variable X equal to
 the numerical features of the customers and a variable y equal to the "Yearly Amount Spent" column. 










Predicting Test Data


Now that I have fit our model, let's evaluate its performance by predicting off the test values

Evaluating the Model

Let's evaluate our model performance by calculating the residual sum of squares and the explained variance score (R^2).



Conclusion

I still want to figure out the answer to the original question, do I focus our effort on mobile app or website development? 
Or maybe that doesn't even really matter?

Interpreting the coefficients
- holding all other features fixed, a 1 unit increase in Avg. Session Length is associated with an increase of 25.98
 total dollars spent.
Holding all other features fixed, a 1 unit increase in Time on App is associated with an increase of 38.59 
total dollars spent.
Holding all other features fixed, a 1 unit increase in Time on Website is associated with an increase of 0.19
 total dollars spent.
Holding all other features fixed, a 1 unit increase in Length of Membership is associated with an increase of 61.27 
total dollars spent.
So, there are two ways to think about this: Develop the Website to catch up to the performance of the mobile app,
 or develop the app more since that is what is working better.

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

Wine Quality Prediction(Logistic Regression) - Kaggle[Dataset]

Titanic - Kaggle

K Nearest Neighbors - Project