Search
📅 Deadline: 20.11.2024 21:59
🏦 Points: 4
In this assignment, you are tasked with training a histogram classifier, computing bounds on its generalization error, and computing bounds on its estimation error. 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 functions learn_classifier, generalization_bound, estimation_error_bound in main.py.
After completing your implementation, you can test your solution using the following commands before submitting it to BRUTE:
python main.py test-cases/public/instances/instance_1.json --plot
Expected output:
The trained histogram classifier achieves true error of at most 0.833 with probability at least 0.95 The trained histogram classifier achieves true error that differs from the best histogram classifier by at most 0.965 with probability at least 0.95 Comparing with reference solution learn_classifier: Test OK generalization_bound: Test OK estimation_error_bound: Test OK
python main.py test-cases/public/instances/instance_2.json --plot
The trained histogram classifier achieves true error of at most 0.484 with probability at least 0.9 The trained histogram classifier achieves true error that differs from the best histogram classifier by at most 0.276 with probability at least 0.9 Comparing with reference solution learn_classifier: Test OK generalization_bound: Test OK estimation_error_bound: Test OK
python main.py test-cases/public/instances/instance_3.json --plot
The trained histogram classifier achieves true error of at most 1.828 with probability at least 0.9 The trained histogram classifier achieves true error that differs from the best histogram classifier by at most 1.898 with probability at least 0.9 Comparing with reference solution learn_classifier: Test OK generalization_bound: Test OK estimation_error_bound: Test OK
python main.py test-cases/public/instances/instance_4.json --plot
The trained histogram classifier achieves true error of at most 0.65 with probability at least 0.9 The trained histogram classifier achieves true error that differs from the best histogram classifier by at most 0.397 with probability at least 0.9 Comparing with reference solution learn_classifier: Test OK generalization_bound: Test OK estimation_error_bound: Test OK
You may encounter issues with numerical errors in this test case. You should find a way to avoid them.