Skip to content

Commit 23dced0

Browse files
authored
Merge pull request #14 from automl/dev
Extended github pages.
2 parents 6c63c3c + 01daf78 commit 23dced0

File tree

14 files changed

+279
-22
lines changed

14 files changed

+279
-22
lines changed

docs/api/games.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
::: hypershap.games

docs/api/hypershap.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
::: hypershap.hypershap

docs/api/surrogate_model.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
::: hypershap.surrogate_model

docs/api/task.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
::: hypershap.task

docs/api/utils.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
::: hypershap.utils

docs/authors.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Authors
2+
3+
## Core Development
4+
5+
- [Marcel Wever](https://www.marcelwever.de){target="_blank"}
6+
7+
## Contributions
8+
- [Maximilian Muschalik](https://maxmuschalik.com/){target="_blank"}
9+
- [Fabian Fumagalli](https://fabianfumagalli.com/){target="_blank"}

docs/cite.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Cite HyperSHAP
2+
3+
If you use HyperSHAP in your research, please cite the original paper:
4+
5+
6+
## Citation String
7+
Wever et al., (2025). HyperSHAP: Shapley Values and Interactions for Hyperparameter Importance. CoRR, abs/2502.01276, https://doi.org/10.48550/ARXIV.2502.01276.
8+
9+
10+
## Bibtex
11+
```bibtex
12+
@article{wever-arxiv25,
13+
author = {Marcel Wever and
14+
Maximilian Muschalik and
15+
Fabian Fumagalli and
16+
Marius Lindauer},
17+
title = {HyperSHAP: Shapley Values and Interactions for Hyperparameter Importance},
18+
journal = {CoRR},
19+
volume = {abs/2502.01276},
20+
year = {2025},
21+
doi = {10.48550/ARXIV.2502.01276},
22+
}
23+
```
24+
25+
The paper introduces the underlying game-theoretic framework and demonstrates its usefulness for HPO explainability.

docs/contribute.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# How to Contribute
2+
3+
Contributions are welcome, and they are greatly appreciated!
4+
Every little bit helps, and credit will always be given.
5+
6+
You can contribute in many ways:
7+
8+
# Types of Contributions
9+
10+
## Report Bugs
11+
12+
Report bugs at https://github.com/automl/HyperSHAP/issues
13+
14+
If you are reporting a bug, please include:
15+
16+
- Your operating system name and version.
17+
- Any details about your local setup that might be helpful in troubleshooting.
18+
- Detailed steps to reproduce the bug.
19+
20+
## Fix Bugs
21+
22+
Look through the GitHub issues for bugs.
23+
Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it.
24+
25+
## Implement Features
26+
27+
Look through the GitHub issues for features.
28+
Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
29+
30+
## Write Documentation
31+
32+
HyperSHAP could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
33+
34+
## Submit Feedback
35+
36+
The best way to send feedback is to file an issue at https://github.com/automl/HyperSHAP/issues.
37+
38+
If you are proposing a new feature:
39+
40+
- Explain in detail how it would work.
41+
- Keep the scope as narrow as possible, to make it easier to implement.
42+
- Remember that this is a volunteer-driven project, and that contributions
43+
are welcome :)
44+
45+
# Get Started!
46+
47+
Ready to contribute? Here's how to set up `HyperSHAP` for local development.
48+
Please note this documentation assumes you already have `uv` and `Git` installed and ready to go.
49+
50+
1. Fork the `HyperSHAP` repo on GitHub.
51+
52+
2. Clone your fork locally:
53+
54+
```bash
55+
cd <directory_in_which_repo_should_be_created>
56+
git clone git@github.com:YOUR_NAME/HyperSHAP.git
57+
```
58+
59+
3. Now we need to install the environment. Navigate into the directory
60+
61+
```bash
62+
cd HyperSHAP
63+
```
64+
65+
Then, install and activate the environment with:
66+
67+
```bash
68+
uv sync
69+
```
70+
71+
4. Install pre-commit to run linters/formatters at commit time:
72+
73+
```bash
74+
uv run pre-commit install
75+
```
76+
77+
5. Create a branch for local development:
78+
79+
```bash
80+
git checkout -b name-of-your-bugfix-or-feature
81+
```
82+
83+
Now you can make your changes locally.
84+
85+
6. Don't forget to add test cases for your added functionality to the `tests` directory.
86+
87+
7. When you're done making changes, check that your changes pass the formatting tests.
88+
89+
```bash
90+
make check
91+
```
92+
93+
Now, validate that all unit tests are passing:
94+
95+
```bash
96+
make test
97+
```
98+
99+
9. Before raising a pull request you should also run tox.
100+
This will run the tests across different versions of Python:
101+
102+
```bash
103+
tox
104+
```
105+
106+
This requires you to have multiple versions of python installed.
107+
This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally.
108+
109+
10. Commit your changes and push your branch to GitHub:
110+
111+
```bash
112+
git add .
113+
git commit -m "Your detailed description of your changes."
114+
git push origin name-of-your-bugfix-or-feature
115+
```
116+
117+
11. Submit a pull request through the GitHub website.
118+
119+
# Pull Request Guidelines
120+
121+
Before you submit a pull request, check that it meets these guidelines:
122+
123+
1. The pull request should include tests.
124+
125+
2. If the pull request adds functionality, the docs should be updated.
126+
Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.

docs/getting_started.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Getting Started
2+
3+
## Installation
4+
5+
The `HyperSHAP` package can be easily installed via PyPI:
6+
7+
```bash
8+
pip install hypershap
9+
```
10+
11+
Alternatively, one can clone the GitHub repository and install hypershap via the following command:
12+
13+
```bash
14+
make install
15+
```
16+
17+
## General Usage
18+
19+
Given an existing setup with a ConfigurationSpace from the [ConfigSpace package](https://github.com/automl/ConfigSpace) and black-box function as follows:
20+
```Python
21+
from ConfigSpace import ConfigurationSpace, Configuration
22+
23+
# ConfigurationSpace describing the hyperparameter space
24+
cs = ConfigurationSpace()
25+
...
26+
27+
# A black-box function, evaluating ConfigSpace.Configuration objects
28+
def blackbox_function(cfg: Configuration) -> float:
29+
...
30+
```
31+
32+
You can use HyperSHAP as follows:
33+
```Python
34+
from hypershap import ExplanationTask, HyperSHAP
35+
36+
# Instantiate HyperSHAP
37+
hypershap = HyperSHAP(ExplanationTask.from_function(config_space=cs,function=blackbox_function))
38+
# Conduct tunability analysis
39+
hypershap.tunability(baseline_config=cs.get_default_configuration())
40+
# Plot results as a Shapley Interaction graph
41+
hypershap.plot_si_graph()
42+
```
43+
44+
The example demonstrates how to:
45+
46+
1. Wrap a black-box function in an explanation task.
47+
2. Use `HyperSHAP` to obtain interaction values for the **tunability** game.
48+
3. Plot the corresponding SI-graph.

docs/help.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Need help?
2+
3+
Do you have further questions or a problem with `HyperSHAP` and do not know how to continue?
4+
5+
1. Check the [examples](https://github.com/automl/HyperSHAP/tree/main/examples), maybe you can find a suitable solution.
6+
2. Check the [GitHub issues](https://github.com/automl/hypershap/issues), maybe someone else has been in a similar situation already.
7+
3. If you could not find anything related, please [create a help issue](https://github.com/automl/hypershap/issues).

0 commit comments

Comments
 (0)