Challenge: Revenue Prediction

Challenge yourself to implement and improve a revenue prediction model using linear regression.

Improve customer revenue prediction model

In this chapter, we’ve been working on an online retail transaction dataset. We have cleaned and preprocessed the initial dataset, extracted a couple of features for our linear regression model, and trained our model. We also learned to evaluate our model in the previous lesson.


Your task in this challenge is to improve the model performance. Here are the steps:

  1. Load the dataset wrangled_transactions.csv. You have to predict revenue_2020.

  2. Handle outliers by filtering out transactions that have more than $5,000 in revenue_2019.

  3. Split the dataset into test and training datasets with a test size of 20 percent.

  4. Build and fit a linear regression model.

  5. Calculate the RMSE score.

Get hands-on with 1200+ tech skills courses.