Exercise 06
Predicting customer spending some more
We¡¯ll be using the lab07_customers.csv data set for this lab. The data set covers the demographic characteristics of some customers and the amount they spent over the past year at an online retailer. We¡¯ll pick up where lab 07 left off. For this exercise it is recommended to use the sklearn packages for linear regression, ridge, and lasso.
1. Build a linear regression with all the dependant variables and the interactions from the lab
Copyright By PowCoder代写 加微信 powcoder
Build ridge models with various values for alpha. Create a chart showing how the coefficients change with alpha values
3. lasso models with various values for alpha. Create a chart showing how the coefficients change with alpha values
4. Compare the coefficients from linear regression, ridge, and lasso (select an alpha value using your chart)
5. Compare the R2 from lr, ridge, and lasso
6. Which model would you choose, and why?
7. Interpret your chosen model
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com