Table of Contents

Assignment: Ensembles

📅 Deadline: 31.12.2024 23:59

🏦 Points: 3

Task Description

In this assignment, you are tasked with implementing the basic logic for training and evaluating random forests and gradient boosted machines. The implementation of the weak learners (random trees) is provided to you.

You are provided with a template containing the following files:

Your objective is to implement the methods build_gbm, evaluate of the GradientBoostedTrees class, and the methods build_forest, evaluate of the RandomForest class in ensembles.py.

All python files must be stored in the root of the .zip sent for submission.
Note that the prediction of the GBM is a weighted sum not a weighted mean

How to Test

After completing your implementation, you can test your solution using the following commands before submitting it to BRUTE:


Test Case 1
python main.py test-cases/public/instances/instance_1.json

Expected output:

Gradient Boosted Machine:
      train_rmse: Test OK
      test_rmse: Test OK
Random Forest:
      train_rmse: Test OK
      test_rmse: Test OK

Test Case 2
python main.py test-cases/public/instances/instance_2.json

Expected output:

Gradient Boosted Machine:
      train_rmse: Test OK
      test_rmse: Test OK
Random Forest:
      train_rmse: Test OK
      test_rmse: Test OK

Submission Guidelines