Table of Contents

Assignment: Generalization Bound

📅 Deadline: 13.11.2025 21:59

🏦 Points: 2

Task Description

In this assignment, you are tasked with computing a generalization bound for a learning algorithm that operates within a finite hypothesis space. You can find the complete description of the assignment in the Assignment PDF.

You are provided with a template containing the following files:

Your objective is to implement the function generalization_bound in main.py.

All python files must be stored in the root of the .zip sent for submission.

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:

Given that we selected the predictor from a hypothesis space of 216 predictors,
the true risk of the predictor is smaller than [0.36] with probability at least 0.95

Comparing with reference solution
Test OK

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

Expected output:

Given that we selected the predictor from a hypothesis space of 54 predictors,
the true risk of the predictor is smaller than [0.30] with probability at least 0.98

Comparing with reference solution
Test OK

Test Case 3
python main.py test-cases/public/instances/instance_3.json

Expected output:

Given that we selected the predictor from a hypothesis space of 54 predictors,
the true risk of the predictor is smaller than [0.28] with probability at least 0.88

Comparing with reference solution
Test OK

Submission Guidelines