How I use Linear Regression to Forecast Company Revenue (Python) - Part 2

Опубликовано: 29 Октябрь 2025
на канале: Code with Marcus
592
17

In this tutorial, I will show you how to perform Machine learning with Python using Linear Regression, with the example of how to forecast the revenue of a company from doing advertisements on Social platforms. I will show you step by step of:

1. How to load the data into Google Colab notebook
2. How to explore the data
3. How to pre-process the data
4. How to split the data into train and test data
5. How to train the model and evaluate the model
6. How to do prediction with using test data

You can download the data set from:
https://github.com/MarcusChong123/Lin...

For full codes:
https://learndatascienceskill.com/ind...

statsmodels.regression.linear_model.OLS
https://www.statsmodels.org/stable/ge...

My website about Data Science:
https://learndatascienceskill.com/