opendp.extras.polars.contingency_table module#
This module requires extra installs: pip install 'opendp[polars]'
For convenience, all the members of this module are also available from opendp.prelude
.
We suggest importing under the conventional name dp
:
>>> import opendp.prelude as dp
The members of this module will then be accessible at dp.polars.contingency_table
.
- class opendp.extras.polars.contingency_table.ContingencyTableQuery(*, oneway_scale, oneway_threshold, **kwargs)[source]#
Bases:
Query
Extends the Query class to include special attributes for contingency tables.
- Parameters:
scale – noise scale to be added to one-way marginals
threshold – cutoff for small groups to be merged into a null group
kwargs – arguments for parent class
oneway_scale (float | None) –
oneway_threshold (int | None) –