1. Learn
  2. /
  3. Courses
  4. /
  5. Winning a Kaggle Competition in Python

Exercise

Train a simple model

As you determined, you are dealing with a regression problem. So, now you're ready to build a model for a subsequent submission. But now, instead of building the simplest Linear Regression model as in the slides, let's build an out-of-box Random Forest model.

You will use the RandomForestRegressor class from the scikit-learn library.

Your objective is to train a Random Forest model with default parameters on the "store" and "item" features.

Instructions

100 XP
  • Read the train data using pandas.
  • Create a Random Forest object.
  • Train the Random Forest model on the "store" and "item" features with "sales" as a target.