In order to prepare for the Bootstrap model (which does not use conformalization), I had to change the inheritance structure of our models so far. We now have a ConformalElectionModel which inherits from the BaseElectionModel and the GaussianElectionModel and NonparametricElectionModel inherit from that. This means we can re-use the aggregation code from the BaseElectionModel in the upcoming bootstrap model without running into issues with a non-existent conformalization set.
We now only deal with the conformalization data in the client if we are using a ConformalElectionModel rather than always, which is what we were doing previously.
I also added type hints and updated the unit tests correspondingly.
Description
In order to prepare for the Bootstrap model (which does not use conformalization), I had to change the inheritance structure of our models so far. We now have a
ConformalElectionModel
which inherits from theBaseElectionModel
and theGaussianElectionModel
andNonparametricElectionModel
inherit from that. This means we can re-use the aggregation code from theBaseElectionModel
in the upcoming bootstrap model without running into issues with a non-existent conformalization set.We now only deal with the conformalization data in the client if we are using a
ConformalElectionModel
rather than always, which is what we were doing previously.I also added type hints and updated the unit tests correspondingly.
Jira Ticket
elex-2766
Test Steps
Unit tests are updated, so
tox
works.Also both old models work like normal:
and