Icon

07 Random Forest - Solution

Solution to an exercise for training a Random Forest model.

Build a Random Forest (Regression) model on a training set. Apply it to a test set, and evaluate the model's performance with numeric scoring metrics.

CHECK YOUR ANSWERS:
Prediction of a room price deviates in average $55 (MAE), 39% in percentage terms (MAPE)

Exercise: Random Forest (Regression)Build a Random Forest model to predict the price of a room.1.1) Execute the workflow below. It reads and preprocesses the Airbnb data.1.2) Partition the data into a training set (70%) and a test set (30%). Apply random sampling.1.3) Train a Random Forest (Regression) model to predict the price column1.4) Apply the model to the test set1.5) Evaluate the model's performance with the Numeric Scorer node1.6) How much in average does the prediction deviate from the actual room price per night? How muchin percentage terms? Read AB_NYC_2019dataPredict priceR2 and error metricsInteractiveData Cleaning CSV Reader Random Forest Learner(Regression) Random Forest Predictor(Regression) Numeric Scorer Partitioning Replace 0 price byneighborhood average Exercise: Random Forest (Regression)Build a Random Forest model to predict the price of a room.1.1) Execute the workflow below. It reads and preprocesses the Airbnb data.1.2) Partition the data into a training set (70%) and a test set (30%). Apply random sampling.1.3) Train a Random Forest (Regression) model to predict the price column1.4) Apply the model to the test set1.5) Evaluate the model's performance with the Numeric Scorer node1.6) How much in average does the prediction deviate from the actual room price per night? How muchin percentage terms? Read AB_NYC_2019dataPredict priceR2 and error metricsInteractiveData Cleaning CSV Reader Random Forest Learner(Regression) Random Forest Predictor(Regression) Numeric Scorer Partitioning Replace 0 price byneighborhood average

Nodes

Extensions

Links