<jupyter_start><jupyter_text>This example uses the [Toyota Corolla](https://www.kaggle.com/klkwak/toyotacorollacsv) data set and some example code of running linear regression models from chapter 6 of [Data Mining for Business Analytics](https://www.dataminingbook.com/book/python-edition)The dataset contains pricing of used Toyotal Corolla cars.The goal of this exercise is to predict the price.On of the challenge with this data is the large number of variables (features).Thus, we would like to select the subset of the features that serve to make a good prediction of the price of cars.1. Predict the price of the car using linear regression and the following features: 'Age_08_04', 'KM', 'Fuel_Type', 'HP', 'Met_Color', 'Automatic', 'CC', 'Doors', 'Quarterly_Tax', 'Weight'Evaluate the resulting model on the training and the testing sets. How well did it do?2. Perform a [Lasso](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Lasso.html) regression on the same data. How did the result change?3. Perform a Lasso regression using all predictors. How well does it predict car price?<jupyter_code>data = pd.read_csv('data/ToyotaCorolla.csv')
data.head(1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08745874587458746, 'fraction_numerical': 0.007425742574257425, 'mean_word_length': 5.592391304347826, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '250419', 'license': 'MIT', 'n_tokens_mistral': 365, 'n_tokens_neox': 345, 'n_words': 145, 'path': '42-workout-blank_linear_regression.ipynb', 'repo_name': 'hanisaf/advanced-data-management-and-analytics', 'size': '1212'}