Practice and reinforce the concepts from Lesson 6
In this hands-on exercise, you'll:
Total Time: ~90 minutes
:computer: Access the exercise template here: Regression Exercise Template
:computer: In this section, you will:
:bulb: Pro tip: Start by visualizing your data with a scatter plot before fitting the regression line. This helps you understand if a linear relationship exists!
Part 2: Multiple Linear Regression :alarm_clock: (25 minutes)
:computer: You will learn to:
- Build regression models with multiple independent variables
- Handle multicollinearity issues
- Compare model performance with additional features
- Understand feature importance in multiple regression tip Common challenge: If you see very high coefficients or strange results, check for multicollinearity using correlation matrices or VIF (Variance Inflation Factor).
:art: This section covers:
:information_source: Note: This section is designed to challenge you! Don't worry if you need extra time. Focus on understanding the concepts rather than rushing through.
:bar_chart: You will master:
:bulb: Tip Remember: A high R² doesn't always mean a good model. Check for overfitting using cross-validation!
:warning: Warning
:memo: IMPORTANT: Submit Your Work!
Please submit your completed notebook through this link:
Exercise Submission Form
:emoji:️ Follow these steps for submission:
Problem: "Import error for sklearn"
!pip install scikit-learn
in a new cellProblem: "ValueError: could not convert string to float"
pd.get_dummies()
for categorical variablesProblem: "LinAlgError: Singular matrix"
Problem: "My R² is negative!"
:information_source: Need help? If you encounter issues not listed here, review the lesson materials or ask for help in the discussion forum before submission.