This exercise consists of several phases designed to guide you through the full machine learning workflow.
Phase 1: Understand the Problem
- Define the business or prediction goal.
- Identify the target variable.
- Identify the input features.
- Determine whether this is a regression or classification problem.
Phase 2: Explore the Data (Exploratory Data Analysis – EDA)
- Load and inspect the dataset.
- Check data types.
- Handle missing values.
- Identify outliers.
- Generate summary statistics.
- Visualize relationships (e.g., scatter plots, correlation matrix).
Phase 3: Prepare the Data
- Select relevant features.
- Encode categorical variables (if any).
Scale/normalize features if needed.
- Split the dataset into training and testing sets (e.g., 80/20 split).
Phase 4: Build a Linear Regression Model
- Train a Linear Regression model on the training data.
- Examine model coefficients.
- Understand the intercept and feature importance.
Phase 5: Evaluate the Linear Regression Model
- Make predictions on the test set.
- Calculate evaluation metrics:
- MAE (Mean Absolute Error)
- RMSE (Root Mean Squared Error)
- R² (R-squared) -Compare training vs. testing performance (check for overfitting).