shapiq_benchmark.setups.LocalConfoundingSetup¶
- class shapiq_benchmark.setups.LocalConfoundingSetup(*, n=500, d=4, setting='ii', mode='signed', regressor='tabpfn', regressor_params=<factory>, random_state=42, unit=0)[source]¶
Bases:
_ConfoundingSetupA
LocalConfoundingXAIgame for one unit of the synthetic study.- Variables:
unit – The index of the explained unit. Defaults to
0.n – The number of samples. Defaults to
500.d – The number of covariates (players), at least
4. Defaults to4.setting –
"i"(homogeneous) or"ii"(heterogeneous effect, default).mode –
"signed"(default),"abs", or"sq".regressor –
"tabpfn"(default) or a model name ofshapiq_benchmark.models.regressor_params – Parameters of the regressor, e.g.
{"version": "v2.5"}.random_state – The seed of the data and the regressors.
Examples
>>> LocalConfoundingSetup(n=200, unit=2, regressor="linear").build().n_players 4
- to_dict()¶
Return the setup as a JSON-serializable dictionary (the inverse of
setup_from_dict()).
- d = 4¶
- property key¶
A stable identifier of the game this setup builds, used as its cache key.
It is a digest of the setup’s name,
version,RECIPE_VERSION, and fields (runtime fields excluded), so it is the same across processes and machines.
- mode = 'signed'¶
- n = 500¶
- name = 'local_confounding'¶
The registered name of the setup.
- random_state = 42¶
- regressor = 'tabpfn'¶
- regressor_params¶
- setting = 'ii'¶
- unit = 0¶