Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to mkdocs #81

Merged
merged 102 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 100 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
01630de
Remove sphinx specific formatting, adjust heading syntax
thomasmarwitz Aug 14, 2024
74b6b10
Add mkdocs deps and 'mkdocs' task.
thomasmarwitz Aug 14, 2024
e187e18
Add configuration to demonstrate rendering a jupyter notebook
thomasmarwitz Aug 14, 2024
8d742e5
Reorder examples to match order in sphinx. Skip costly optuna jn exec…
thomasmarwitz Aug 15, 2024
a6b8385
first version of mk
thomasmarwitz Aug 20, 2024
fb5cfcb
Custom gitignore for docs
thomasmarwitz Aug 20, 2024
49b86f1
Remove sphinx remnant
thomasmarwitz Aug 20, 2024
5835c42
Add katex
thomasmarwitz Aug 20, 2024
711619c
Update math
thomasmarwitz Aug 20, 2024
6443cf3
Fix list intendation
thomasmarwitz Aug 20, 2024
bb817ec
Reindent, remove escaped subscript
thomasmarwitz Aug 27, 2024
978b7ab
Dedent
thomasmarwitz Aug 27, 2024
3cb50f5
Fix subscript
thomasmarwitz Aug 27, 2024
5b1621d
Translate 'motivation' to markdown
thomasmarwitz Aug 27, 2024
79ad83d
Translate 'faq' to markdown
thomasmarwitz Aug 27, 2024
4bb19ae
Remove sphinx specific stuff
thomasmarwitz Aug 28, 2024
3de6dbf
Add changelog and docu
thomasmarwitz Aug 28, 2024
e934f22
Port development to md
thomasmarwitz Aug 28, 2024
00c0f01
Port glossary to md
thomasmarwitz Aug 28, 2024
5cea6a9
fix symlink
thomasmarwitz Aug 28, 2024
760377d
Port glossary to md
thomasmarwitz Aug 28, 2024
7b9623b
Beautiful highlight for target
thomasmarwitz Aug 28, 2024
e899571
Format bullets as headings to be able to link to them
thomasmarwitz Aug 28, 2024
940dbba
Fix links
thomasmarwitz Aug 28, 2024
992a786
Index page for examples
thomasmarwitz Aug 28, 2024
ea06d1c
Fix some math
thomasmarwitz Aug 28, 2024
29a2f67
Index more like sphinx
thomasmarwitz Aug 28, 2024
170b630
Add checkboxes example in motivation
thomasmarwitz Aug 28, 2024
3683981
Fix enumeration
thomasmarwitz Aug 28, 2024
a5dac7b
Add missing links to glossary
thomasmarwitz Aug 28, 2024
48fc2fa
Adapt readthedocks
thomasmarwitz Aug 28, 2024
6a9478f
Add 'development' to nav
thomasmarwitz Aug 28, 2024
8a06c0b
Fix links
thomasmarwitz Aug 28, 2024
9c7941b
Adapt pixi doc-related tasks
thomasmarwitz Aug 28, 2024
3c843f6
Fix links
thomasmarwitz Aug 28, 2024
d01d6a5
Enable sphinx-like behavior through mkdocstrings-python extension
thomasmarwitz Nov 5, 2024
7ad8fd8
Remove custom target css, add note what this css selector does
thomasmarwitz Nov 5, 2024
3ea507b
Fix math and math in enumerations (with indentation)
thomasmarwitz Nov 26, 2024
448a516
Remove index.rst again.
thomasmarwitz Nov 26, 2024
ca42dfe
Use list like format as in sphinx
thomasmarwitz Nov 26, 2024
d1bc821
Mirror sphinx layout
thomasmarwitz Nov 26, 2024
f97fd8e
Actual indent
thomasmarwitz Nov 26, 2024
4a9374b
Add checkboxes in motivation part
thomasmarwitz Nov 26, 2024
1a8c952
Revert
thomasmarwitz Nov 26, 2024
938f539
Indent
thomasmarwitz Nov 26, 2024
9ef2d22
Prettier
thomasmarwitz Nov 26, 2024
6459a83
Update docs/styles/custom.css
thomasmarwitz Nov 29, 2024
ca984b9
Use lower case bool values
thomasmarwitz Nov 29, 2024
707ab59
Adjust pixi docs tasks
thomasmarwitz Nov 29, 2024
a391608
Resolve link to notebook
thomasmarwitz Nov 29, 2024
45b5f50
Remove target css selector
thomasmarwitz Nov 29, 2024
093e985
Fixes
thomasmarwitz Nov 29, 2024
330164b
Adapt to mkdocs style (links, code, math)
thomasmarwitz Nov 29, 2024
8722a12
Set indent to 4 in prettier for markdown.
thomasmarwitz Dec 3, 2024
94ce4c0
Changes
thomasmarwitz Dec 3, 2024
b796139
Check output cells of notebooks
thomasmarwitz Dec 10, 2024
abed496
Check outputs of example notebooks in CI.
thomasmarwitz Dec 13, 2024
9c14ca2
Add outputs
thomasmarwitz Dec 13, 2024
993e5cd
Fix bash for loop with default option
thomasmarwitz Dec 13, 2024
95b734f
Capitalize bullets
thomasmarwitz Feb 18, 2025
eb6217a
Fix headings of mkdocs not rendering if code block
thomasmarwitz Feb 18, 2025
f004931
Fix code reference
thomasmarwitz Feb 18, 2025
8692ea9
Fix all {term} refs to glossary in notebooks
thomasmarwitz Feb 18, 2025
14fed59
Remove sphinx specific identifiers for refs.
thomasmarwitz Feb 18, 2025
458edf3
Fix notes / warnings
thomasmarwitz Feb 18, 2025
7769bb9
Fix {ref} in notebooks
thomasmarwitz Feb 18, 2025
34d6926
Fix {math} in notebooks
thomasmarwitz Feb 18, 2025
430fee0
Fix two remaining note blocks
thomasmarwitz Feb 18, 2025
e520c28
Fix docstrings sphinx format
thomasmarwitz Feb 21, 2025
413b41f
Remove execute ignore since no notebook is executed.
thomasmarwitz Feb 21, 2025
f8f8802
Fix sphinx class and method-like references
thomasmarwitz Feb 21, 2025
a02d13f
Open external links in new tab
thomasmarwitz Feb 21, 2025
9809584
Update lockfile
thomasmarwitz Feb 21, 2025
2f6f249
Fix pre-commit
thomasmarwitz Feb 21, 2025
f289911
correct math in docs/background.md
thomasmarwitz Feb 25, 2025
0f85708
Update docs/parallelism.md
thomasmarwitz Feb 25, 2025
8e8edc2
Correct Math
thomasmarwitz Feb 25, 2025
8695177
Add smarty extension for dash rendering via '--'.
thomasmarwitz Feb 25, 2025
03a8c08
Disable protected method rendering in docs
thomasmarwitz Feb 25, 2025
529790a
Correct image
thomasmarwitz Feb 25, 2025
bb57b74
Fix method reference name
thomasmarwitz Feb 25, 2025
726e73c
Fix title
thomasmarwitz Feb 25, 2025
e1ac0ae
Fix image in notebook
thomasmarwitz Feb 25, 2025
2838e29
Add 12.0 in md changelog, get rid of rst changelog
thomasmarwitz Feb 25, 2025
047c93b
precommit fixes
thomasmarwitz Feb 25, 2025
66c973b
Merge branch 'main' into mkdocs
kklein Feb 26, 2025
086e3b7
Provide svg files with white background.
kklein Feb 26, 2025
bd9ff71
Integrate dark mode images, add padding
thomasmarwitz Feb 26, 2025
aaae1de
Add reference link to snippet
thomasmarwitz Feb 26, 2025
e32b1fd
Add reference to link snippet
thomasmarwitz Feb 26, 2025
029bfc9
site_desc and site_url for SEO
thomasmarwitz Feb 26, 2025
0c7a33a
Remove unecessary / cleared things
thomasmarwitz Feb 26, 2025
fff7733
Pre-commit
thomasmarwitz Feb 26, 2025
a3176fd
Remove unnecessary ignores
thomasmarwitz Feb 26, 2025
e0e7f5d
Replace black with ruff
thomasmarwitz Feb 26, 2025
81b8f90
Removing log
thomasmarwitz Feb 26, 2025
1f04ff2
Bash script improvements
thomasmarwitz Feb 26, 2025
8de46a4
FUrhter bash improvements
thomasmarwitz Feb 26, 2025
c3865f9
Make nb script executable
thomasmarwitz Feb 26, 2025
66074a3
Fix bash script invokation
thomasmarwitz Feb 26, 2025
a406a63
Improve bash script
thomasmarwitz Feb 26, 2025
4f82bfe
Restore typical line break behavior in code output
thomasmarwitz Feb 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure

mypy-example-nbs:
name: Check notebooks mypy
check-example-nbs:
name: Check notebooks mypy and output exists
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
Expand All @@ -48,6 +48,9 @@ jobs:
run: |
pixi run nb-convert
pixi run nb-mypy
- name: Check output exists
run: |
pixi run nb-assert-output

unit-tests:
name: Unit Tests
Expand Down
10 changes: 9 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
"bracketSpacing": true,
"printWidth": 200,
"endOfLine": "auto",
"tabWidth": 2
"tabWidth": 2,
"overrides": [
{
"files": "*.md",
"options": {
"tabWidth": 4
}
}
]
}
4 changes: 1 addition & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ build:
commands:
- mamba install -c conda-forge -c nodefaults pixi
- pixi run -e docs postinstall
- pixi run -e docs docs
- pixi run -e docs docs-build
- pixi run -e docs readthedocs
sphinx:
configuration: docs/conf.py
formats:
- pdf
128 changes: 128 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!-- Versioning follows semantic versioning, see also
https://semver.org/spec/v2.0.0.html. The most important bits are:
* Update the major if you break the public API
* Update the minor if you add new functionality
* Update the patch if you fixed a bug -->

# Changelog

## 0.12.0 (2025-01-29)

### Other changes

- Comply with `scikit-learn` versions 1.6 and higher.

## 0.11.0 (2024-09-05)

### New features

- Add support for using `scipy.sparse.csr_matrix` as datastructure for covariates `X`.

## 0.10.0 (2024-08-13)

### New features

- Add abstract method [`MetaLearner.predict_conditional_average_outcomes`][metalearners.metalearner.MetaLearner.predict_conditional_average_outcomes] to [`metalearners.metalearner.MetaLearner`][metalearners.metalearner.MetaLearner].
- Implement [`RLearner.predict_conditional_average_outcomes`][metalearners.rlearner.RLearner.predict_conditional_average_outcomes] for [`metalearners.rlearner.RLearner`][metalearners.rlearner.RLearner].

### Bug fixes

- Fix bug in which the [`metalearners.slearner.SLearner`][metalearners.slearner.SLearner]'s inference step would have some leakage in the in-sample scenario.

## 0.9.0 (2024-08-02)

### New features

- Add [`MetaLearner.init_args`][metalearners.metalearner.MetaLearner.init_args].
- Add [`FixedBinaryPropensity`][metalearners.utils.FixedBinaryPropensity].
- Add `MetaLearner._build_onnx` to [`metalearners.MetaLearner`][metalearners.metalearner.MetaLearner] abstract class and implement it for [`TLearner`][metalearners.tlearner.TLearner], [`XLearner`][metalearners.xlearner.XLearner], [`RLearner`][metalearners.rlearner.RLearner], and [`DRLearner`][metalearners.drlearner.DRLearner].
- Add `MetaLearner._necessary_onnx_models`.
- Add [`DRLearner.average_treatment_effect`][metalearners.drlearner.DRLearner.average_treatment_effect] to compute the AIPW point estimate and standard error for average treatment effects (ATE) without requiring a full model fit.

## 0.8.0 (2024-07-22)

### New features

- Add [`MetaLearner.fit_all_nuisance`][metalearners.metalearner.MetaLearner.fit_all_nuisance] and [`MetaLearner.fit_all_treatment`][metalearners.metalearner.MetaLearner.fit_all_treatment].
- Add optional `store_raw_results` and `store_results` parameters to [`MetaLearnerGridSearch`][metalearners.grid_search.MetaLearnerGridSearch].
- Renamed `_GSResult` to [`GSResult`][metalearners.grid_search.GSResult].
- Added `grid_size_` attribute to [`MetaLearnerGridSearch`][metalearners.grid_search.MetaLearnerGridSearch].
- Implement [`CrossFitEstimator.score`][metalearners.cross_fit_estimator.CrossFitEstimator.score].

### Bug fixes

- Fixed a bug in [`MetaLearner.evaluate`][metalearners.metalearner.MetaLearner.evaluate] where it failed in the case of `feature_set` being different from `None`.

## 0.7.0 (2024-07-12)

### New features

- Add optional `adaptive_clipping` parameter to [`DRLearner`][metalearners.drlearner.DRLearner].

### Other changes

- Change the index columns order in `MetaLearnerGridSearch.results_`.
- Raise a custom error if only one class is present in a classification outcome.
- Raise a custom error if there are some treatment variants which have seen classification outcomes that have not appeared for some other treatment variant.

## 0.6.0 (2024-07-08)

### New features

- Implement [`MetaLearnerGridSearch`][metalearners.grid_search.MetaLearnerGridSearch].
- Add a `scoring` parameter to [`MetaLearner.evaluate`][metalearners.metalearner.MetaLearner.evaluate] and implement the abstract method for [`XLearner`][metalearners.xlearner.XLearner] and [`DRLearner`][metalearners.drlearner.DRLearner].

### Other changes

- Increase the lower bound on `scikit-learn` from 1.3 to 1.4.
- Drop the run dependency on `git_root`.

## 0.5.0 (2024-06-18)

- No longer raise an error if `feature_set` is provided to [`SLearner`][metalearners.slearner.SLearner].
- Fix a bug where base model dictionaries -- e.g., `n_folds` or `feature-set` -- were improperly initialized if the provided dictionary's keys were a strict superset of the expected keys.

## 0.4.2 (2024-06-18)

- Ship license file.

## 0.4.1 (2024-06-18)

- Fix dependencies for pip.

## 0.4.0 (2024-06-18)

- Implemented [`CrossFitEstimator.clone`][metalearners.cross_fit_estimator.CrossFitEstimator.clone].
- Added `n_jobs_base_learners` to [`MetaLearner.fit`][metalearners.metalearner.MetaLearner.fit].
- Renamed [`Explainer.feature_importances`][metalearners.explainer.Explainer.feature_importances]. Note this is a breaking change.
- Renamed [`MetaLearner.feature_importances`][metalearners.metalearner.MetaLearner.feature_importances]. Note this is a breaking change.
- Renamed [`Explainer.shap_values`][metalearners.explainer.Explainer.shap_values]. Note this is a breaking change.
- Renamed [`MetaLearner.shap_values`][metalearners.metalearner.MetaLearner.shap_values]. Note this is a breaking change.
- Renamed [`MetaLearner.explainer`][metalearners.metalearner.MetaLearner.explainer]. Note this is a breaking change.
- Implemented `synchronize_cross_fitting` parameter for [`MetaLearner.fit`][metalearners.metalearner.MetaLearner.fit].
- Implemented `cv` parameter for [`CrossFitEstimator.fit`][metalearners.cross_fit_estimator.CrossFitEstimator.fit].

## 0.3.0 (2024-06-03)

- Implemented [`Explainer`][metalearners.explainer.Explainer] with support for binary classification and regression outcomes and discrete treatment variants.
- Integration of [`Explainer`][metalearners.explainer.Explainer] with [`MetaLearner`][metalearners.metalearner.MetaLearner] for feature importance and SHAP values calculations.
- Implemented model reuse through the `fitted_nuisance_models` and `fitted_propensity_model` parameters of [`MetaLearner`][metalearners.metalearner.MetaLearner].
- Allow for `fit_params` in [`MetaLearner.fit`][metalearners.metalearner.MetaLearner.fit].

## 0.2.0 (2024-05-28)

Beta release with:

- [`DRLearner`][metalearners.drlearner.DRLearner] with support for binary classification and regression outcomes and discrete treatment variants.
- Generalization of [`TLearner`][metalearners.tlearner.TLearner], [`XLearner`][metalearners.xlearner.XLearner], and [`RLearner`][metalearners.rlearner.RLearner] to allow for more than two discrete treatment variants.
- Unification of shapes returned by `predict` methods.
- [`simplify_output`][metalearners.utils.simplify_output] and [`metalearner_factory`][metalearners.utils.metalearner_factory].

## 0.1.0 (2024-05-16)

Alpha release with:

- [`TLearner`][metalearners.tlearner.TLearner] with support for binary classification and regression outcomes and binary treatment variants.
- [`SLearner`][metalearners.slearner.SLearner] with support for binary classification and regression outcomes and discrete treatment variants.
- [`XLearner`][metalearners.xlearner.XLearner] with support for binary classification and regression outcomes and binary treatment variants.
- [`RLearner`][metalearners.rlearner.RLearner] with support for binary classification and regression outcomes and binary treatment variants.
220 changes: 0 additions & 220 deletions CHANGELOG.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore artifacts created during notebook execution
***.onnx
Loading