__STYLES__
In this project, we analyze the advertising sales data to identify the relationship between the amount spent on advertising in various mediums and the resulting sales figures. The dataset consists of monthly advertising expenditure on TV, radio, and newspaper along with the corresponding sales figures for a period of three months.
We use the pandas library to load the data into a pandas dataframe, and then split it into input and output variables. We use train_test_split from sklearn to split the data into training and testing sets, with 75% of the data used for training and 25% for testing.
We create a linear regression model using LinearRegression from sklearn and fit it to the training data. We use this model to make predictions on the testing data, and evaluate its performance using the mean squared error and R-squared metrics.
We also extract the model coefficients and print them along with their corresponding advertising mediums. This helps us understand the relative importance of each advertising medium in predicting the sales figures.
Overall, this project aims to provide insights into the relationship between advertising expenditure and sales, and create a model that can be used to predict sales figures based on advertising expenditure.