项目作者: Moozzart

项目描述 :
Assignment: Linear and Sparse Regression Consider the attached dataset about advertising and sales. The attributes denote the investments on advertising in TV, radio etc and the target variable is the total sales. The aim is to predict the sales from the investments on advertising. 1) Randomly divide the dataset into training (75%) and testing (25%) subsets [1 mark] 2) Using Linear Regression, fit a model to predict the sales from investments using your own formula. Compare the coefficients as found by the python library function [3 marks] 3) Compute the mean squared error on the testing set [1 marks] 4) Using ridge regression with different values of lambda (0.5, 1, 5, 10, 50, 100) plot the coefficients against each other, and also compare the test set mean squared errors. [3 marks] 5) Use the library function of "LASSO regression" to find out which of the 3 features is most important, i.e. whose coefficient is furthest from 0
高级语言: Jupyter Notebook
项目地址: git://github.com/Moozzart/Linear-and-Sparse-Regression-.git
创建时间: 2020-11-22T07:39:04Z
项目社区:https://github.com/Moozzart/Linear-and-Sparse-Regression-

开源协议:

下载