├── docs ├── .nojekyll ├── objects.inv ├── _static │ ├── file.png │ ├── minus.png │ ├── plus.png │ ├── coverforest.ico │ ├── coverforest_96.png │ ├── img │ │ ├── coverforest.ico │ │ └── coverforest_96.png │ ├── images │ │ ├── logo_colab.png │ │ ├── logo_deepnote.svg │ │ ├── logo_binder.svg │ │ └── logo_jupyterhub.svg │ ├── styles │ │ └── theme.css │ ├── vendor │ │ └── fontawesome │ │ │ └── webfonts │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-solid-900.woff2 │ │ │ └── fa-regular-400.woff2 │ ├── scripts │ │ ├── fontawesome.js.LICENSE.txt │ │ ├── bootstrap.js.LICENSE.txt │ │ ├── sphinx-book-theme.js │ │ └── sphinx-book-theme.js.map │ ├── check-solid.svg │ ├── documentation_options.js │ ├── copy-button.svg │ ├── sbt-webpack-macros.html │ ├── webpack-macros.html │ ├── locales │ │ ├── bn │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── zh_CN │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── mr │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ko │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── zh_TW │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ms │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ur │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ja │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ca │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── te │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ml │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── tl │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ta │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── iw │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── th │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ar │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── da │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── no │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── vi │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── eo │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── id │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── et │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── tg │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── pl │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── pt │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── sv │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── tr │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── fi │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── nl │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── sk │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── cs │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── lv │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── sl │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ro │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── sr │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── uk │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── de │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── bg │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── hr │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── lt │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── ru │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── el │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── es │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ ├── fr │ │ │ └── LC_MESSAGES │ │ │ │ └── booktheme.po │ │ └── it │ │ │ └── LC_MESSAGES │ │ │ └── booktheme.po │ ├── css │ │ └── coverforest.css │ ├── copybutton.css │ ├── copybutton_funcs.js │ ├── js │ │ └── copybutton.js │ ├── doctools.js │ ├── language_data.js │ ├── sphinx_highlight.js │ ├── clipboard.min.js │ └── copybutton.js ├── _sources │ ├── regression │ │ └── index.rst │ ├── classification │ │ └── index.rst │ ├── generated │ │ ├── coverforest.metrics.average_set_size_loss.rst │ │ ├── coverforest.metrics.regression_coverage_score.rst │ │ ├── coverforest.metrics.average_interval_length_loss.rst │ │ ├── coverforest.metrics.classification_coverage_score.rst │ │ ├── coverforest.CoverForestRegressor.rst │ │ └── coverforest.CoverForestClassifier.rst │ ├── api.rst │ └── index.rst ├── _images │ ├── 088abb6cb07e501b397187bf4b961aa0cc3af291ff969feb78dd10cfcec66814.png │ ├── 3f7dc6f8a8ec964c62f12b915076aeec17c78f94d351e3129d78f17bd096ca8b.png │ ├── 42c4ba24ed6118f1f262abe21f4f61a5a386eb74810c0f7d09b8eb38ef4283f8.png │ ├── 68de7834a94434e488af4356170266fa0a76084f270b1439ddf029893896960d.png │ ├── 6ca40e8653cc9508acb4a7c472d70142457bc19e706cba030c8596c435cccabc.png │ ├── 6e7a54c8017d9afeee8e9fa9d988665107d47f7cdce7a543e7b46a6c81bafd79.png │ ├── a19a02d8df8998da598503042a9f505c5d20bea34e03799a2e1876684d8ecc15.png │ ├── d4e77015b6b639393cef420e514e737cebfc27809db03b1a5ef8dc122893aaac.png │ ├── e507bfdbfb21ce26e9532b303cd40ba3eb5d16d0c0cdee12e3d47b46d9b58993.png │ └── e512ff2800f74d23e7804b1ad7c80da693c5e2a74da883a375d1fb2f8279e3e6.png ├── .buildinfo └── .buildinfo.bak ├── coverforest ├── tests │ ├── __init__.py │ ├── test_template.py │ └── test_common.py ├── __init__.py └── metrics.py ├── images └── coverforest_96.png ├── experiments ├── requirements.txt ├── README.md ├── experiment_classification_2_mapie.py ├── experiment_regression_2_ours.py ├── experiment_regression_2_mapie.py ├── experiment_regression_1.py ├── experiment_classification_2_ours.py └── experiment_classification_1.py ├── .pre-commit-config.yaml ├── .github ├── workflows │ ├── lint.yml │ ├── python-app.yml │ └── deploy-gh-pages.yml ├── dependabot.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── .gitignore ├── LICENSE ├── setup.py ├── pyproject.toml └── README.md /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/objects.inv -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/plus.png -------------------------------------------------------------------------------- /coverforest/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Authors: scikit-learn-contrib developers 2 | # License: BSD 3 clause 3 | -------------------------------------------------------------------------------- /images/coverforest_96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/images/coverforest_96.png -------------------------------------------------------------------------------- /docs/_static/coverforest.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/coverforest.ico -------------------------------------------------------------------------------- /docs/_static/coverforest_96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/coverforest_96.png -------------------------------------------------------------------------------- /docs/_static/img/coverforest.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/img/coverforest.ico -------------------------------------------------------------------------------- /docs/_static/images/logo_colab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/images/logo_colab.png -------------------------------------------------------------------------------- /docs/_static/img/coverforest_96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/img/coverforest_96.png -------------------------------------------------------------------------------- /docs/_static/styles/theme.css: -------------------------------------------------------------------------------- 1 | /* Provided by Sphinx's 'basic' theme, and included in the final set of assets */ 2 | @import "../basic.css"; 3 | -------------------------------------------------------------------------------- /docs/_sources/regression/index.rst: -------------------------------------------------------------------------------- 1 | Regression Examples 2 | =================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | :glob: 7 | 8 | * 9 | -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/vendor/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/vendor/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_static/vendor/fontawesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /experiments/requirements.txt: -------------------------------------------------------------------------------- 1 | coverforest 2 | MAPIE 3 | numpy 4 | pandas 5 | scikit_learn>=1.6.1 6 | scipy 7 | tensorflow_cpu 8 | ucimlrepo 9 | matplotlib 10 | seaborn 11 | -------------------------------------------------------------------------------- /docs/_sources/classification/index.rst: -------------------------------------------------------------------------------- 1 | Classification Examples 2 | ======================= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | classification_pipeline 8 | classification_gridsearch 9 | -------------------------------------------------------------------------------- /docs/_images/088abb6cb07e501b397187bf4b961aa0cc3af291ff969feb78dd10cfcec66814.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/088abb6cb07e501b397187bf4b961aa0cc3af291ff969feb78dd10cfcec66814.png -------------------------------------------------------------------------------- /docs/_images/3f7dc6f8a8ec964c62f12b915076aeec17c78f94d351e3129d78f17bd096ca8b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/3f7dc6f8a8ec964c62f12b915076aeec17c78f94d351e3129d78f17bd096ca8b.png -------------------------------------------------------------------------------- /docs/_images/42c4ba24ed6118f1f262abe21f4f61a5a386eb74810c0f7d09b8eb38ef4283f8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/42c4ba24ed6118f1f262abe21f4f61a5a386eb74810c0f7d09b8eb38ef4283f8.png -------------------------------------------------------------------------------- /docs/_images/68de7834a94434e488af4356170266fa0a76084f270b1439ddf029893896960d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/68de7834a94434e488af4356170266fa0a76084f270b1439ddf029893896960d.png -------------------------------------------------------------------------------- /docs/_images/6ca40e8653cc9508acb4a7c472d70142457bc19e706cba030c8596c435cccabc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/6ca40e8653cc9508acb4a7c472d70142457bc19e706cba030c8596c435cccabc.png -------------------------------------------------------------------------------- /docs/_images/6e7a54c8017d9afeee8e9fa9d988665107d47f7cdce7a543e7b46a6c81bafd79.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/6e7a54c8017d9afeee8e9fa9d988665107d47f7cdce7a543e7b46a6c81bafd79.png -------------------------------------------------------------------------------- /docs/_images/a19a02d8df8998da598503042a9f505c5d20bea34e03799a2e1876684d8ecc15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/a19a02d8df8998da598503042a9f505c5d20bea34e03799a2e1876684d8ecc15.png -------------------------------------------------------------------------------- /docs/_images/d4e77015b6b639393cef420e514e737cebfc27809db03b1a5ef8dc122893aaac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/d4e77015b6b639393cef420e514e737cebfc27809db03b1a5ef8dc122893aaac.png -------------------------------------------------------------------------------- /docs/_images/e507bfdbfb21ce26e9532b303cd40ba3eb5d16d0c0cdee12e3d47b46d9b58993.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/e507bfdbfb21ce26e9532b303cd40ba3eb5d16d0c0cdee12e3d47b46d9b58993.png -------------------------------------------------------------------------------- /docs/_images/e512ff2800f74d23e7804b1ad7c80da693c5e2a74da883a375d1fb2f8279e3e6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/donlapark/coverforest/HEAD/docs/_images/e512ff2800f74d23e7804b1ad7c80da693c5e2a74da883a375d1fb2f8279e3e6.png -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 1c151804a13c3ed6ebfe11484bfd2a0b 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.buildinfo.bak: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: d2b8a0ab82b5d38c535954ccf720b943 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/_sources/generated/coverforest.metrics.average_set_size_loss.rst: -------------------------------------------------------------------------------- 1 | coverforest.metrics.average\_set\_size\_loss 2 | ============================================ 3 | 4 | .. currentmodule:: coverforest.metrics 5 | 6 | .. autofunction:: average_set_size_loss 7 | -------------------------------------------------------------------------------- /docs/_sources/generated/coverforest.metrics.regression_coverage_score.rst: -------------------------------------------------------------------------------- 1 | coverforest.metrics.regression\_coverage\_score 2 | =============================================== 3 | 4 | .. currentmodule:: coverforest.metrics 5 | 6 | .. autofunction:: regression_coverage_score 7 | -------------------------------------------------------------------------------- /docs/_static/scripts/fontawesome.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | * Copyright 2024 Fonticons, Inc. 5 | */ 6 | -------------------------------------------------------------------------------- /docs/_sources/generated/coverforest.metrics.average_interval_length_loss.rst: -------------------------------------------------------------------------------- 1 | coverforest.metrics.average\_interval\_length\_loss 2 | =================================================== 3 | 4 | .. currentmodule:: coverforest.metrics 5 | 6 | .. autofunction:: average_interval_length_loss 7 | -------------------------------------------------------------------------------- /docs/_sources/generated/coverforest.metrics.classification_coverage_score.rst: -------------------------------------------------------------------------------- 1 | coverforest.metrics.classification\_coverage\_score 2 | =================================================== 3 | 4 | .. currentmodule:: coverforest.metrics 5 | 6 | .. autofunction:: classification_coverage_score 7 | -------------------------------------------------------------------------------- /docs/_static/scripts/bootstrap.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v5.3.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5 | */ 6 | -------------------------------------------------------------------------------- /experiments/README.md: -------------------------------------------------------------------------------- 1 | ## Experiments for reproducing the plots in the paper "`coverforest`: Conformal Predictions with Random Forest in Python" 2 | 3 | 1. Install the required packages using `pip install -r requirements.txt`. 4 | 2. Run all Python files to generate the experiment data. 5 | 3. Run all Notebook files to generate the plots. 6 | -------------------------------------------------------------------------------- /docs/_static/check-solid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '0.0.4', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; 14 | -------------------------------------------------------------------------------- /docs/_static/copy-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coverforest/__init__.py: -------------------------------------------------------------------------------- 1 | """Random forests with conformal methods for set prediction and interval prediction.""" 2 | 3 | # Authors: Donlapark Ponnoprat 4 | # Panisara Meehinkong 5 | # License: BSD 3 clause 6 | 7 | from ._forest import ( 8 | CoverForestClassifier, 9 | CoverForestRegressor, 10 | ) 11 | 12 | __all__ = [ 13 | "CoverForestClassifier", 14 | "CoverForestRegressor", 15 | ] 16 | -------------------------------------------------------------------------------- /docs/_static/sbt-webpack-macros.html: -------------------------------------------------------------------------------- 1 | 5 | {% macro head_pre_bootstrap() %} 6 | 7 | {% endmacro %} 8 | 9 | {% macro body_post() %} 10 | 11 | {% endmacro %} 12 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v5.0.0 4 | hooks: 5 | - id: check-yaml 6 | - id: end-of-file-fixer 7 | - id: trailing-whitespace 8 | - repo: https://github.com/astral-sh/ruff-pre-commit 9 | rev: v0.9.1 10 | hooks: 11 | - id: ruff 12 | args: [ --fix ] 13 | - id: ruff-format 14 | - repo: https://github.com/psf/black 15 | rev: 23.3.0 16 | hooks: 17 | - id: black 18 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Linter 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | with: 17 | persist-credentials: false 18 | - uses: prefix-dev/setup-pixi@v0.8.5 19 | with: 20 | pixi-version: v0.40.1 21 | environments: lint 22 | auth-host: prefix.dev 23 | auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} 24 | 25 | - name: Run linter 26 | run: pixi run -e lint lint 27 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions as recommended in SPEC8: 4 | # https://github.com/scientific-python/specs/pull/325 5 | # At the time of writing, release critical workflows such as 6 | # pypa/gh-action-pypi-publish should use hash-based versioning for security 7 | # reasons. This strategy may be generalized to all other github actions 8 | # in the future. 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: "weekly" 13 | groups: 14 | actions: 15 | patterns: 16 | - "*" 17 | reviewers: 18 | - "glemaitre" 19 | -------------------------------------------------------------------------------- /docs/_static/images/logo_deepnote.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /coverforest/tests/test_template.py: -------------------------------------------------------------------------------- 1 | """This file will just show how to write tests for the main classes.""" 2 | 3 | import pytest 4 | from sklearn.datasets import load_iris 5 | 6 | from coverforest import CoverForestClassifier 7 | 8 | # Authors: scikit-learn-contrib developers 9 | # License: BSD 3 clause 10 | 11 | 12 | @pytest.fixture 13 | def data(): 14 | return load_iris(return_X_y=True) 15 | 16 | 17 | def test_template_classifier(data): 18 | """Check the internals and behaviour of `TemplateClassifier`.""" 19 | X, y = data 20 | clf = CoverForestClassifier() 21 | 22 | clf.fit(X, y) 23 | assert hasattr(clf, "classes_") 24 | assert hasattr(clf, "y_") 25 | 26 | y_pred = clf.predict(X) 27 | assert y_pred.ndim == 1 28 | assert y_pred.shape[0] == X.shape[0] 29 | -------------------------------------------------------------------------------- /docs/_sources/api.rst: -------------------------------------------------------------------------------- 1 | .. _api: 2 | 3 | ############# 4 | API Reference 5 | ############# 6 | 7 | This is an example on how to document the API of your own project. 8 | 9 | .. currentmodule:: coverforest 10 | 11 | Classifier 12 | ========== 13 | 14 | .. autosummary:: 15 | :toctree: generated/ 16 | :template: class.rst 17 | 18 | CoverForestClassifier 19 | 20 | Regressor 21 | ========= 22 | 23 | .. autosummary:: 24 | :toctree: generated/ 25 | :template: class.rst 26 | 27 | CoverForestRegressor 28 | 29 | 30 | metrics 31 | ======= 32 | 33 | .. autosummary:: 34 | :toctree: generated/ 35 | :template: functions.rst 36 | 37 | metrics.average_interval_length_loss 38 | metrics.average_set_size_loss 39 | metrics.classification_coverage_score 40 | metrics.regression_coverage_score 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/workflows/python-app.yml: -------------------------------------------------------------------------------- 1 | name: Unit Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | strategy: 14 | matrix: 15 | os: [ubuntu-latest, windows-latest, macos-latest] 16 | python-version: ["3.9", "3.10", "3.11", "3.12"] 17 | environment: [test] 18 | runs-on: ${{ matrix.os }} 19 | steps: 20 | - uses: actions/checkout@v4 21 | with: 22 | persist-credentials: false 23 | - uses: prefix-dev/setup-pixi@v0.8.5 24 | with: 25 | pixi-version: v0.40.1 26 | auth-host: prefix.dev 27 | auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} 28 | 29 | - name: Run Tests 30 | run: pixi run -e ${{ matrix.environment }} test 31 | - name: Upload coverage reports to Codecov 32 | uses: codecov/codecov-action@v5 33 | with: 34 | token: ${{ secrets.CODECOV_TOKEN }} 35 | slug: donlapark/coverforest 36 | -------------------------------------------------------------------------------- /.github/workflows/deploy-gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: Documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | deploy-gh-pages: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | with: 18 | fetch-depth: 0 19 | persist-credentials: false 20 | - uses: prefix-dev/setup-pixi@v0.8.5 21 | with: 22 | pixi-version: v0.40.1 23 | environments: doc 24 | auth-host: prefix.dev 25 | auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} 26 | 27 | - name: Build documentation 28 | run: pixi run -e doc build-doc 29 | 30 | - name: Update the main gh-page website 31 | if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} 32 | uses: peaceiris/actions-gh-pages@v4.0.0 33 | with: 34 | github_token: ${{ secrets.GITHUB_TOKEN }} 35 | publish_dir: ./doc/_build/html 36 | commit_message: "[ci skip] ${{ github.event.head_commit.message }}" 37 | -------------------------------------------------------------------------------- /docs/_sources/generated/coverforest.CoverForestRegressor.rst: -------------------------------------------------------------------------------- 1 | CoverForestRegressor 2 | ============================================== 3 | 4 | .. currentmodule:: coverforest 5 | 6 | .. autoclass:: CoverForestRegressor 7 | 8 | 9 | 10 | 11 | .. rubric:: Methods 12 | 13 | .. autosummary:: 14 | 15 | 16 | 17 | ~CoverForestRegressor.apply 18 | 19 | 20 | ~CoverForestRegressor.decision_path 21 | 22 | 23 | ~CoverForestRegressor.fit 24 | 25 | 26 | ~CoverForestRegressor.get_metadata_routing 27 | 28 | 29 | ~CoverForestRegressor.get_params 30 | 31 | 32 | ~CoverForestRegressor.predict 33 | 34 | 35 | ~CoverForestRegressor.score 36 | 37 | 38 | ~CoverForestRegressor.set_fit_request 39 | 40 | 41 | ~CoverForestRegressor.set_params 42 | 43 | 44 | ~CoverForestRegressor.set_predict_request 45 | 46 | 47 | ~CoverForestRegressor.set_score_request 48 | 49 | 50 | 51 | 52 | .. include:: coverforest.CoverForestRegressor.examples 53 | 54 | .. raw:: html 55 | 56 |
57 | -------------------------------------------------------------------------------- /docs/_static/images/logo_binder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | logo 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/_sources/generated/coverforest.CoverForestClassifier.rst: -------------------------------------------------------------------------------- 1 | CoverForestClassifier 2 | =============================================== 3 | 4 | .. currentmodule:: coverforest 5 | 6 | .. autoclass:: CoverForestClassifier 7 | 8 | 9 | 10 | 11 | .. rubric:: Methods 12 | 13 | .. autosummary:: 14 | 15 | 16 | 17 | ~CoverForestClassifier.apply 18 | 19 | 20 | ~CoverForestClassifier.decision_path 21 | 22 | 23 | ~CoverForestClassifier.fit 24 | 25 | 26 | ~CoverForestClassifier.get_metadata_routing 27 | 28 | 29 | ~CoverForestClassifier.get_params 30 | 31 | 32 | ~CoverForestClassifier.predict 33 | 34 | 35 | ~CoverForestClassifier.predict_log_proba 36 | 37 | 38 | ~CoverForestClassifier.predict_proba 39 | 40 | 41 | ~CoverForestClassifier.score 42 | 43 | 44 | ~CoverForestClassifier.search_k_and_lambda 45 | 46 | 47 | ~CoverForestClassifier.set_fit_request 48 | 49 | 50 | ~CoverForestClassifier.set_params 51 | 52 | 53 | ~CoverForestClassifier.set_predict_request 54 | 55 | 56 | ~CoverForestClassifier.set_score_request 57 | 58 | 59 | 60 | 61 | .. include:: coverforest.CoverForestClassifier.examples 62 | 63 | .. raw:: html 64 | 65 |
66 | -------------------------------------------------------------------------------- /docs/_static/webpack-macros.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | {% macro head_pre_assets() %} 7 | 8 | 9 | 10 | {% endmacro %} 11 | 12 | {% macro head_js_preload() %} 13 | 14 | 15 | 16 | 17 | 18 | {% endmacro %} 19 | 20 | {% macro body_post() %} 21 | 22 | 23 | 24 | {% endmacro %} 25 | -------------------------------------------------------------------------------- /docs/_static/locales/bn/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: bn\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "পিডিএফ প্রিন্ট করুন" 13 | 14 | msgid "Theme by the" 15 | msgstr "থিম দ্বারা" 16 | 17 | msgid "Download source file" 18 | msgstr "উত্স ফাইল ডাউনলোড করুন" 19 | 20 | msgid "open issue" 21 | msgstr "খোলা সমস্যা" 22 | 23 | msgid "previous page" 24 | msgstr "আগের পৃষ্ঠা" 25 | 26 | msgid "Download notebook file" 27 | msgstr "নোটবুক ফাইল ডাউনলোড করুন" 28 | 29 | msgid "Copyright" 30 | msgstr "কপিরাইট" 31 | 32 | msgid "Download this page" 33 | msgstr "এই পৃষ্ঠাটি ডাউনলোড করুন" 34 | 35 | msgid "Source repository" 36 | msgstr "উত্স সংগ্রহস্থল" 37 | 38 | msgid "By" 39 | msgstr "দ্বারা" 40 | 41 | msgid "Last updated on" 42 | msgstr "সর্বশেষ আপডেট" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "নেভিগেশন টগল করুন" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "স্পিনিক্স বুক থিম" 49 | 50 | msgid "Open an issue" 51 | msgstr "একটি সমস্যা খুলুন" 52 | 53 | msgid "Launch" 54 | msgstr "শুরু করা" 55 | 56 | msgid "Edit this page" 57 | msgstr "এই পৃষ্ঠাটি সম্পাদনা করুন" 58 | 59 | msgid "By the" 60 | msgstr "দ্বারা" 61 | 62 | msgid "next page" 63 | msgstr "পরবর্তী পৃষ্ঠা" 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # scikit-learn specific 10 | doc/_build/ 11 | doc/auto_examples/ 12 | doc/modules/generated/ 13 | doc/datasets/generated/ 14 | 15 | # Distribution / packaging 16 | 17 | .Python 18 | env/ 19 | build/ 20 | develop-eggs/ 21 | dist/ 22 | downloads/ 23 | eggs/ 24 | .eggs/ 25 | lib/ 26 | lib64/ 27 | parts/ 28 | sdist/ 29 | var/ 30 | *.egg-info/ 31 | .installed.cfg 32 | *.egg 33 | 34 | # PyInstaller 35 | # Usually these files are written by a python script from a template 36 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 37 | *.manifest 38 | *.spec 39 | 40 | # Installer logs 41 | pip-log.txt 42 | pip-delete-this-directory.txt 43 | 44 | # Unit test / coverage reports 45 | htmlcov/ 46 | .tox/ 47 | .coverage 48 | .coverage.* 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | *,cover 53 | .hypothesis/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | 62 | # Sphinx documentation 63 | doc/_build/ 64 | doc/generated/ 65 | doc/sg_execution_times.rst 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | .pixi 71 | 72 | # General 73 | .DS_Store 74 | .AppleDouble 75 | .LSOverride 76 | .ipynb_checkpoints 77 | 78 | doc/ 79 | wheels/ 80 | wheelhouse/ 81 | requirements/ 82 | 83 | # auto-generated files 84 | coverforest/_version.py 85 | -------------------------------------------------------------------------------- /docs/_static/locales/zh_CN/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: zh_CN\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "列印成 PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "主题作者:" 16 | 17 | msgid "Download source file" 18 | msgstr "下载源文件" 19 | 20 | msgid "open issue" 21 | msgstr "创建议题" 22 | 23 | msgid "Contents" 24 | msgstr "目录" 25 | 26 | msgid "previous page" 27 | msgstr "上一页" 28 | 29 | msgid "Download notebook file" 30 | msgstr "下载笔记本文件" 31 | 32 | msgid "Copyright" 33 | msgstr "版权" 34 | 35 | msgid "Download this page" 36 | msgstr "下载此页面" 37 | 38 | msgid "Source repository" 39 | msgstr "源码库" 40 | 41 | msgid "By" 42 | msgstr "作者:" 43 | 44 | msgid "repository" 45 | msgstr "仓库" 46 | 47 | msgid "Last updated on" 48 | msgstr "上次更新时间:" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "显示或隐藏导航栏" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx Book 主题" 55 | 56 | msgid "suggest edit" 57 | msgstr "提出修改建议" 58 | 59 | msgid "Open an issue" 60 | msgstr "创建议题" 61 | 62 | msgid "Launch" 63 | msgstr "启动" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "全屏模式" 67 | 68 | msgid "Edit this page" 69 | msgstr "编辑此页面" 70 | 71 | msgid "By the" 72 | msgstr "作者:" 73 | 74 | msgid "next page" 75 | msgstr "下一页" 76 | -------------------------------------------------------------------------------- /docs/_static/css/coverforest.css: -------------------------------------------------------------------------------- 1 | /* Override some aspects of the pydata-sphinx-theme */ 2 | 3 | :root { 4 | /* Use softer blue from bootstrap's default info color */ 5 | --pst-color-info: 23, 162, 184; 6 | } 7 | 8 | table { 9 | width: auto; 10 | /* Override fit-content which breaks Styler user guide ipynb */ 11 | } 12 | 13 | .transparent-image { 14 | background: none !important; 15 | margin-top: 1em; 16 | margin-bottom: 1em; 17 | } 18 | 19 | /* Main index page overview cards */ 20 | 21 | .intro-card { 22 | padding: 30px 10px 20px 10px; 23 | } 24 | 25 | .intro-card .sd-card-img-top { 26 | margin: 10px; 27 | height: 52px; 28 | background: none !important; 29 | } 30 | 31 | .intro-card .sd-card-title { 32 | color: var(--pst-color-primary); 33 | font-size: var(--pst-font-size-h5); 34 | padding: 1rem 0rem 0.5rem 0rem; 35 | } 36 | 37 | .intro-card .sd-card-footer { 38 | border: none !important; 39 | } 40 | 41 | .intro-card .sd-card-footer p.sd-card-text { 42 | max-width: 220px; 43 | margin-left: auto; 44 | margin-right: auto; 45 | } 46 | 47 | .intro-card .sd-btn-secondary { 48 | background-color: #6c757d !important; 49 | border-color: #6c757d !important; 50 | } 51 | 52 | .intro-card .sd-btn-secondary:hover { 53 | background-color: #5a6268 !important; 54 | border-color: #545b62 !important; 55 | } 56 | 57 | .card, .card img { 58 | background-color: var(--pst-color-background); 59 | } 60 | -------------------------------------------------------------------------------- /docs/_static/locales/mr/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: mr\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "पीडीएफवर मुद्रित करा" 13 | 14 | msgid "Theme by the" 15 | msgstr "द्वारा थीम" 16 | 17 | msgid "Download source file" 18 | msgstr "स्त्रोत फाइल डाउनलोड करा" 19 | 20 | msgid "open issue" 21 | msgstr "खुला मुद्दा" 22 | 23 | msgid "previous page" 24 | msgstr "मागील पान" 25 | 26 | msgid "Download notebook file" 27 | msgstr "नोटबुक फाईल डाउनलोड करा" 28 | 29 | msgid "Copyright" 30 | msgstr "कॉपीराइट" 31 | 32 | msgid "Download this page" 33 | msgstr "हे पृष्ठ डाउनलोड करा" 34 | 35 | msgid "Source repository" 36 | msgstr "स्त्रोत भांडार" 37 | 38 | msgid "By" 39 | msgstr "द्वारा" 40 | 41 | msgid "Last updated on" 42 | msgstr "अखेरचे अद्यतनित" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "नेव्हिगेशन टॉगल करा" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "स्फिंक्स बुक थीम" 49 | 50 | msgid "suggest edit" 51 | msgstr "संपादन सुचवा" 52 | 53 | msgid "Open an issue" 54 | msgstr "एक मुद्दा उघडा" 55 | 56 | msgid "Launch" 57 | msgstr "लाँच करा" 58 | 59 | msgid "Edit this page" 60 | msgstr "हे पृष्ठ संपादित करा" 61 | 62 | msgid "By the" 63 | msgstr "द्वारा" 64 | 65 | msgid "next page" 66 | msgstr "पुढील पृष्ठ" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/ko/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ko\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "PDF로 인쇄" 13 | 14 | msgid "Theme by the" 15 | msgstr "테마별" 16 | 17 | msgid "Download source file" 18 | msgstr "소스 파일 다운로드" 19 | 20 | msgid "open issue" 21 | msgstr "열린 문제" 22 | 23 | msgid "Contents" 24 | msgstr "내용" 25 | 26 | msgid "previous page" 27 | msgstr "이전 페이지" 28 | 29 | msgid "Download notebook file" 30 | msgstr "노트북 파일 다운로드" 31 | 32 | msgid "Copyright" 33 | msgstr "저작권" 34 | 35 | msgid "Download this page" 36 | msgstr "이 페이지 다운로드" 37 | 38 | msgid "Source repository" 39 | msgstr "소스 저장소" 40 | 41 | msgid "By" 42 | msgstr "으로" 43 | 44 | msgid "repository" 45 | msgstr "저장소" 46 | 47 | msgid "Last updated on" 48 | msgstr "마지막 업데이트" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "탐색 전환" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "스핑크스 도서 테마" 55 | 56 | msgid "suggest edit" 57 | msgstr "편집 제안" 58 | 59 | msgid "Open an issue" 60 | msgstr "이슈 열기" 61 | 62 | msgid "Launch" 63 | msgstr "시작하다" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "전체 화면으로보기" 67 | 68 | msgid "Edit this page" 69 | msgstr "이 페이지 편집" 70 | 71 | msgid "By the" 72 | msgstr "에 의해" 73 | 74 | msgid "next page" 75 | msgstr "다음 페이지" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/zh_TW/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: zh_TW\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "列印成 PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "佈景主題作者:" 16 | 17 | msgid "Download source file" 18 | msgstr "下載原始檔" 19 | 20 | msgid "open issue" 21 | msgstr "公開的問題" 22 | 23 | msgid "Contents" 24 | msgstr "目錄" 25 | 26 | msgid "previous page" 27 | msgstr "上一頁" 28 | 29 | msgid "Download notebook file" 30 | msgstr "下載 Notebook 檔案" 31 | 32 | msgid "Copyright" 33 | msgstr "Copyright" 34 | 35 | msgid "Download this page" 36 | msgstr "下載此頁面" 37 | 38 | msgid "Source repository" 39 | msgstr "來源儲存庫" 40 | 41 | msgid "By" 42 | msgstr "作者:" 43 | 44 | msgid "repository" 45 | msgstr "儲存庫" 46 | 47 | msgid "Last updated on" 48 | msgstr "最後更新時間:" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "顯示或隱藏導覽列" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx Book 佈景主題" 55 | 56 | msgid "suggest edit" 57 | msgstr "提出修改建議" 58 | 59 | msgid "Open an issue" 60 | msgstr "開啟議題" 61 | 62 | msgid "Launch" 63 | msgstr "啟動" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "全螢幕模式" 67 | 68 | msgid "Edit this page" 69 | msgstr "編輯此頁面" 70 | 71 | msgid "By the" 72 | msgstr "作者:" 73 | 74 | msgid "next page" 75 | msgstr "下一頁" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/ms/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ms\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Cetak ke PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema oleh" 16 | 17 | msgid "Download source file" 18 | msgstr "Muat turun fail sumber" 19 | 20 | msgid "open issue" 21 | msgstr "isu terbuka" 22 | 23 | msgid "previous page" 24 | msgstr "halaman sebelumnya" 25 | 26 | msgid "Download notebook file" 27 | msgstr "Muat turun fail buku nota" 28 | 29 | msgid "Copyright" 30 | msgstr "hak cipta" 31 | 32 | msgid "Download this page" 33 | msgstr "Muat turun halaman ini" 34 | 35 | msgid "Source repository" 36 | msgstr "Repositori sumber" 37 | 38 | msgid "By" 39 | msgstr "Oleh" 40 | 41 | msgid "Last updated on" 42 | msgstr "Terakhir dikemas kini pada" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "Togol navigasi" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "Tema Buku Sphinx" 49 | 50 | msgid "suggest edit" 51 | msgstr "cadangkan edit" 52 | 53 | msgid "Open an issue" 54 | msgstr "Buka masalah" 55 | 56 | msgid "Launch" 57 | msgstr "Lancarkan" 58 | 59 | msgid "Edit this page" 60 | msgstr "Edit halaman ini" 61 | 62 | msgid "By the" 63 | msgstr "Oleh" 64 | 65 | msgid "next page" 66 | msgstr "muka surat seterusnya" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/ur/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ur\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "پی ڈی ایف پرنٹ کریں" 13 | 14 | msgid "Theme by the" 15 | msgstr "کے ذریعہ تھیم" 16 | 17 | msgid "Download source file" 18 | msgstr "سورس فائل ڈاؤن لوڈ کریں" 19 | 20 | msgid "open issue" 21 | msgstr "کھلا مسئلہ" 22 | 23 | msgid "previous page" 24 | msgstr "سابقہ ​​صفحہ" 25 | 26 | msgid "Download notebook file" 27 | msgstr "نوٹ بک فائل ڈاؤن لوڈ کریں" 28 | 29 | msgid "Copyright" 30 | msgstr "کاپی رائٹ" 31 | 32 | msgid "Download this page" 33 | msgstr "اس صفحے کو ڈاؤن لوڈ کریں" 34 | 35 | msgid "Source repository" 36 | msgstr "ماخذ ذخیرہ" 37 | 38 | msgid "By" 39 | msgstr "بذریعہ" 40 | 41 | msgid "Last updated on" 42 | msgstr "آخری بار تازہ کاری ہوئی" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "نیویگیشن ٹوگل کریں" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "سپنکس بک تھیم" 49 | 50 | msgid "suggest edit" 51 | msgstr "ترمیم کی تجویز کریں" 52 | 53 | msgid "Open an issue" 54 | msgstr "ایک مسئلہ کھولیں" 55 | 56 | msgid "Launch" 57 | msgstr "لانچ کریں" 58 | 59 | msgid "Edit this page" 60 | msgstr "اس صفحے میں ترمیم کریں" 61 | 62 | msgid "By the" 63 | msgstr "کی طرف" 64 | 65 | msgid "next page" 66 | msgstr "اگلا صفحہ" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/ja/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ja\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "PDFに印刷" 13 | 14 | msgid "Theme by the" 15 | msgstr "のテーマ" 16 | 17 | msgid "Download source file" 18 | msgstr "ソースファイルをダウンロード" 19 | 20 | msgid "open issue" 21 | msgstr "未解決の問題" 22 | 23 | msgid "Contents" 24 | msgstr "目次" 25 | 26 | msgid "previous page" 27 | msgstr "前のページ" 28 | 29 | msgid "Download notebook file" 30 | msgstr "ノートブックファイルをダウンロード" 31 | 32 | msgid "Copyright" 33 | msgstr "Copyright" 34 | 35 | msgid "Download this page" 36 | msgstr "このページをダウンロード" 37 | 38 | msgid "Source repository" 39 | msgstr "ソースリポジトリ" 40 | 41 | msgid "By" 42 | msgstr "著者" 43 | 44 | msgid "repository" 45 | msgstr "リポジトリ" 46 | 47 | msgid "Last updated on" 48 | msgstr "最終更新日" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "ナビゲーションを切り替え" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "スフィンクスの本のテーマ" 55 | 56 | msgid "suggest edit" 57 | msgstr "編集を提案する" 58 | 59 | msgid "Open an issue" 60 | msgstr "問題を報告" 61 | 62 | msgid "Launch" 63 | msgstr "起動" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "全画面モード" 67 | 68 | msgid "Edit this page" 69 | msgstr "このページを編集" 70 | 71 | msgid "By the" 72 | msgstr "によって" 73 | 74 | msgid "next page" 75 | msgstr "次のページ" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/ca/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ca\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Imprimeix a PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema del" 16 | 17 | msgid "Download source file" 18 | msgstr "Baixeu el fitxer font" 19 | 20 | msgid "open issue" 21 | msgstr "número obert" 22 | 23 | msgid "previous page" 24 | msgstr "Pàgina anterior" 25 | 26 | msgid "Download notebook file" 27 | msgstr "Descarregar fitxer de quadern" 28 | 29 | msgid "Copyright" 30 | msgstr "Copyright" 31 | 32 | msgid "Download this page" 33 | msgstr "Descarregueu aquesta pàgina" 34 | 35 | msgid "Source repository" 36 | msgstr "Dipòsit de fonts" 37 | 38 | msgid "By" 39 | msgstr "Per" 40 | 41 | msgid "Last updated on" 42 | msgstr "Darrera actualització el" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "Commuta la navegació" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "Tema del llibre Esfinx" 49 | 50 | msgid "suggest edit" 51 | msgstr "suggerir edició" 52 | 53 | msgid "Open an issue" 54 | msgstr "Obriu un número" 55 | 56 | msgid "Launch" 57 | msgstr "Llançament" 58 | 59 | msgid "Edit this page" 60 | msgstr "Editeu aquesta pàgina" 61 | 62 | msgid "By the" 63 | msgstr "Per la" 64 | 65 | msgid "next page" 66 | msgstr "pàgina següent" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/te/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: te\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "PDF కి ముద్రించండి" 13 | 14 | msgid "Theme by the" 15 | msgstr "ద్వారా థీమ్" 16 | 17 | msgid "Download source file" 18 | msgstr "మూల ఫైల్‌ను డౌన్‌లోడ్ చేయండి" 19 | 20 | msgid "open issue" 21 | msgstr "ఓపెన్ ఇష్యూ" 22 | 23 | msgid "previous page" 24 | msgstr "ముందు పేజి" 25 | 26 | msgid "Download notebook file" 27 | msgstr "నోట్బుక్ ఫైల్ను డౌన్లోడ్ చేయండి" 28 | 29 | msgid "Copyright" 30 | msgstr "కాపీరైట్" 31 | 32 | msgid "Download this page" 33 | msgstr "ఈ పేజీని డౌన్‌లోడ్ చేయండి" 34 | 35 | msgid "Source repository" 36 | msgstr "మూల రిపోజిటరీ" 37 | 38 | msgid "By" 39 | msgstr "ద్వారా" 40 | 41 | msgid "Last updated on" 42 | msgstr "చివరిగా నవీకరించబడింది" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "నావిగేషన్‌ను టోగుల్ చేయండి" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "సింహిక పుస్తక థీమ్" 49 | 50 | msgid "suggest edit" 51 | msgstr "సవరించమని సూచించండి" 52 | 53 | msgid "Open an issue" 54 | msgstr "సమస్యను తెరవండి" 55 | 56 | msgid "Launch" 57 | msgstr "ప్రారంభించండి" 58 | 59 | msgid "Edit this page" 60 | msgstr "ఈ పేజీని సవరించండి" 61 | 62 | msgid "By the" 63 | msgstr "ద్వారా" 64 | 65 | msgid "next page" 66 | msgstr "తరువాతి పేజీ" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/ml/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ml\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "PDF- ലേക്ക് പ്രിന്റുചെയ്യുക" 13 | 14 | msgid "Theme by the" 15 | msgstr "പ്രമേയം" 16 | 17 | msgid "Download source file" 18 | msgstr "ഉറവിട ഫയൽ ഡൗൺലോഡുചെയ്യുക" 19 | 20 | msgid "open issue" 21 | msgstr "തുറന്ന പ്രശ്നം" 22 | 23 | msgid "previous page" 24 | msgstr "മുൻപത്തെ താൾ" 25 | 26 | msgid "Download notebook file" 27 | msgstr "നോട്ട്ബുക്ക് ഫയൽ ഡൺലോഡ് ചെയ്യുക" 28 | 29 | msgid "Copyright" 30 | msgstr "പകർപ്പവകാശം" 31 | 32 | msgid "Download this page" 33 | msgstr "ഈ പേജ് ഡൗൺലോഡുചെയ്യുക" 34 | 35 | msgid "Source repository" 36 | msgstr "ഉറവിട ശേഖരം" 37 | 38 | msgid "By" 39 | msgstr "എഴുതിയത്" 40 | 41 | msgid "Last updated on" 42 | msgstr "അവസാനം അപ്‌ഡേറ്റുചെയ്‌തത്" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "നാവിഗേഷൻ ടോഗിൾ ചെയ്യുക" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "സ്ഫിങ്ക്സ് പുസ്തക തീം" 49 | 50 | msgid "suggest edit" 51 | msgstr "എഡിറ്റുചെയ്യാൻ നിർദ്ദേശിക്കുക" 52 | 53 | msgid "Open an issue" 54 | msgstr "ഒരു പ്രശ്നം തുറക്കുക" 55 | 56 | msgid "Launch" 57 | msgstr "സമാരംഭിക്കുക" 58 | 59 | msgid "Edit this page" 60 | msgstr "ഈ പേജ് എഡിറ്റുചെയ്യുക" 61 | 62 | msgid "By the" 63 | msgstr "എഴുതിയത്" 64 | 65 | msgid "next page" 66 | msgstr "അടുത്ത പേജ്" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/tl/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: tl\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "I-print sa PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema ng" 16 | 17 | msgid "Download source file" 18 | msgstr "Mag-download ng file ng pinagmulan" 19 | 20 | msgid "open issue" 21 | msgstr "bukas na isyu" 22 | 23 | msgid "previous page" 24 | msgstr "Nakaraang pahina" 25 | 26 | msgid "Download notebook file" 27 | msgstr "Mag-download ng file ng notebook" 28 | 29 | msgid "Copyright" 30 | msgstr "Copyright" 31 | 32 | msgid "Download this page" 33 | msgstr "I-download ang pahinang ito" 34 | 35 | msgid "Source repository" 36 | msgstr "Pinagmulan ng imbakan" 37 | 38 | msgid "By" 39 | msgstr "Ni" 40 | 41 | msgid "Last updated on" 42 | msgstr "Huling na-update noong" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "I-toggle ang pag-navigate" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "Tema ng Sphinx Book" 49 | 50 | msgid "suggest edit" 51 | msgstr "iminumungkahi i-edit" 52 | 53 | msgid "Open an issue" 54 | msgstr "Magbukas ng isyu" 55 | 56 | msgid "Launch" 57 | msgstr "Ilunsad" 58 | 59 | msgid "Edit this page" 60 | msgstr "I-edit ang pahinang ito" 61 | 62 | msgid "By the" 63 | msgstr "Sa pamamagitan ng" 64 | 65 | msgid "next page" 66 | msgstr "Susunod na pahina" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/ta/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ta\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "PDF இல் அச்சிடுக" 13 | 14 | msgid "Theme by the" 15 | msgstr "வழங்கிய தீம்" 16 | 17 | msgid "Download source file" 18 | msgstr "மூல கோப்பைப் பதிவிறக்குக" 19 | 20 | msgid "open issue" 21 | msgstr "திறந்த பிரச்சினை" 22 | 23 | msgid "previous page" 24 | msgstr "முந்தைய பக்கம்" 25 | 26 | msgid "Download notebook file" 27 | msgstr "நோட்புக் கோப்பைப் பதிவிறக்கவும்" 28 | 29 | msgid "Copyright" 30 | msgstr "பதிப்புரிமை" 31 | 32 | msgid "Download this page" 33 | msgstr "இந்தப் பக்கத்தைப் பதிவிறக்கவும்" 34 | 35 | msgid "Source repository" 36 | msgstr "மூல களஞ்சியம்" 37 | 38 | msgid "By" 39 | msgstr "வழங்கியவர்" 40 | 41 | msgid "Last updated on" 42 | msgstr "கடைசியாக புதுப்பிக்கப்பட்டது" 43 | 44 | msgid "Toggle navigation" 45 | msgstr "வழிசெலுத்தலை நிலைமாற்று" 46 | 47 | msgid "Sphinx Book Theme" 48 | msgstr "ஸ்பிங்க்ஸ் புத்தக தீம்" 49 | 50 | msgid "suggest edit" 51 | msgstr "திருத்த பரிந்துரைக்கவும்" 52 | 53 | msgid "Open an issue" 54 | msgstr "சிக்கலைத் திறக்கவும்" 55 | 56 | msgid "Launch" 57 | msgstr "தொடங்க" 58 | 59 | msgid "Edit this page" 60 | msgstr "இந்தப் பக்கத்தைத் திருத்தவும்" 61 | 62 | msgid "By the" 63 | msgstr "மூலம்" 64 | 65 | msgid "next page" 66 | msgstr "அடுத்த பக்கம்" 67 | -------------------------------------------------------------------------------- /docs/_static/locales/iw/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: iw\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "הדפס לקובץ PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "נושא מאת" 16 | 17 | msgid "Download source file" 18 | msgstr "הורד את קובץ המקור" 19 | 20 | msgid "open issue" 21 | msgstr "בעיה פתוחה" 22 | 23 | msgid "Contents" 24 | msgstr "תוכן" 25 | 26 | msgid "previous page" 27 | msgstr "עמוד קודם" 28 | 29 | msgid "Download notebook file" 30 | msgstr "הורד קובץ מחברת" 31 | 32 | msgid "Copyright" 33 | msgstr "זכויות יוצרים" 34 | 35 | msgid "Download this page" 36 | msgstr "הורד דף זה" 37 | 38 | msgid "Source repository" 39 | msgstr "מאגר המקורות" 40 | 41 | msgid "By" 42 | msgstr "על ידי" 43 | 44 | msgid "repository" 45 | msgstr "מאגר" 46 | 47 | msgid "Last updated on" 48 | msgstr "עודכן לאחרונה ב" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "החלף ניווט" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "נושא ספר ספינקס" 55 | 56 | msgid "suggest edit" 57 | msgstr "מציע לערוך" 58 | 59 | msgid "Open an issue" 60 | msgstr "פתח גיליון" 61 | 62 | msgid "Launch" 63 | msgstr "לְהַשִׁיק" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "מצב מסך מלא" 67 | 68 | msgid "Edit this page" 69 | msgstr "ערוך דף זה" 70 | 71 | msgid "By the" 72 | msgstr "דרך" 73 | 74 | msgid "next page" 75 | msgstr "עמוד הבא" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/th/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: th\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "พิมพ์เป็น PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "ธีมโดย" 16 | 17 | msgid "Download source file" 18 | msgstr "ดาวน์โหลดไฟล์ต้นฉบับ" 19 | 20 | msgid "open issue" 21 | msgstr "เปิดปัญหา" 22 | 23 | msgid "Contents" 24 | msgstr "สารบัญ" 25 | 26 | msgid "previous page" 27 | msgstr "หน้าที่แล้ว" 28 | 29 | msgid "Download notebook file" 30 | msgstr "ดาวน์โหลดไฟล์สมุดบันทึก" 31 | 32 | msgid "Copyright" 33 | msgstr "ลิขสิทธิ์" 34 | 35 | msgid "Download this page" 36 | msgstr "ดาวน์โหลดหน้านี้" 37 | 38 | msgid "Source repository" 39 | msgstr "ที่เก็บซอร์ส" 40 | 41 | msgid "By" 42 | msgstr "โดย" 43 | 44 | msgid "repository" 45 | msgstr "ที่เก็บ" 46 | 47 | msgid "Last updated on" 48 | msgstr "ปรับปรุงล่าสุดเมื่อ" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "ไม่ต้องสลับช่องทาง" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "ธีมหนังสือสฟิงซ์" 55 | 56 | msgid "suggest edit" 57 | msgstr "แนะนำแก้ไข" 58 | 59 | msgid "Open an issue" 60 | msgstr "เปิดปัญหา" 61 | 62 | msgid "Launch" 63 | msgstr "เปิด" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "โหมดเต็มหน้าจอ" 67 | 68 | msgid "Edit this page" 69 | msgstr "แก้ไขหน้านี้" 70 | 71 | msgid "By the" 72 | msgstr "โดย" 73 | 74 | msgid "next page" 75 | msgstr "หน้าต่อไป" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/ar/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ar\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "طباعة إلى PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "موضوع بواسطة" 16 | 17 | msgid "Download source file" 18 | msgstr "تنزيل ملف المصدر" 19 | 20 | msgid "open issue" 21 | msgstr "قضية مفتوحة" 22 | 23 | msgid "Contents" 24 | msgstr "محتويات" 25 | 26 | msgid "previous page" 27 | msgstr "الصفحة السابقة" 28 | 29 | msgid "Download notebook file" 30 | msgstr "تنزيل ملف دفتر الملاحظات" 31 | 32 | msgid "Copyright" 33 | msgstr "حقوق النشر" 34 | 35 | msgid "Download this page" 36 | msgstr "قم بتنزيل هذه الصفحة" 37 | 38 | msgid "Source repository" 39 | msgstr "مستودع المصدر" 40 | 41 | msgid "By" 42 | msgstr "بواسطة" 43 | 44 | msgid "repository" 45 | msgstr "مخزن" 46 | 47 | msgid "Last updated on" 48 | msgstr "آخر تحديث في" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "تبديل التنقل" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "موضوع كتاب أبو الهول" 55 | 56 | msgid "suggest edit" 57 | msgstr "أقترح تحرير" 58 | 59 | msgid "Open an issue" 60 | msgstr "افتح قضية" 61 | 62 | msgid "Launch" 63 | msgstr "إطلاق" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "وضع ملء الشاشة" 67 | 68 | msgid "Edit this page" 69 | msgstr "قم بتحرير هذه الصفحة" 70 | 71 | msgid "By the" 72 | msgstr "بواسطة" 73 | 74 | msgid "next page" 75 | msgstr "الصفحة التالية" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/da/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: da\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Udskriv til PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema af" 16 | 17 | msgid "Download source file" 18 | msgstr "Download kildefil" 19 | 20 | msgid "open issue" 21 | msgstr "åbent nummer" 22 | 23 | msgid "Contents" 24 | msgstr "Indhold" 25 | 26 | msgid "previous page" 27 | msgstr "forrige side" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Download notesbog-fil" 31 | 32 | msgid "Copyright" 33 | msgstr "ophavsret" 34 | 35 | msgid "Download this page" 36 | msgstr "Download denne side" 37 | 38 | msgid "Source repository" 39 | msgstr "Kildelager" 40 | 41 | msgid "By" 42 | msgstr "Ved" 43 | 44 | msgid "repository" 45 | msgstr "lager" 46 | 47 | msgid "Last updated on" 48 | msgstr "Sidst opdateret den" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Skift navigation" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx bogtema" 55 | 56 | msgid "suggest edit" 57 | msgstr "foreslå redigering" 58 | 59 | msgid "Open an issue" 60 | msgstr "Åbn et problem" 61 | 62 | msgid "Launch" 63 | msgstr "Start" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Fuldskærmstilstand" 67 | 68 | msgid "Edit this page" 69 | msgstr "Rediger denne side" 70 | 71 | msgid "By the" 72 | msgstr "Ved" 73 | 74 | msgid "next page" 75 | msgstr "Næste side" 76 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2025, Donlapark Ponnoprat and Panisara Meehinkong 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of coverforest nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /docs/_static/locales/no/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: no\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Skriv ut til PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema av" 16 | 17 | msgid "Download source file" 18 | msgstr "Last ned kildefilen" 19 | 20 | msgid "open issue" 21 | msgstr "åpent nummer" 22 | 23 | msgid "Contents" 24 | msgstr "Innhold" 25 | 26 | msgid "previous page" 27 | msgstr "forrige side" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Last ned notatbokfilen" 31 | 32 | msgid "Copyright" 33 | msgstr "opphavsrett" 34 | 35 | msgid "Download this page" 36 | msgstr "Last ned denne siden" 37 | 38 | msgid "Source repository" 39 | msgstr "Kildedepot" 40 | 41 | msgid "By" 42 | msgstr "Av" 43 | 44 | msgid "repository" 45 | msgstr "oppbevaringssted" 46 | 47 | msgid "Last updated on" 48 | msgstr "Sist oppdatert den" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Bytt navigasjon" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx boktema" 55 | 56 | msgid "suggest edit" 57 | msgstr "foreslå redigering" 58 | 59 | msgid "Open an issue" 60 | msgstr "Åpne et problem" 61 | 62 | msgid "Launch" 63 | msgstr "Start" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Fullskjerm-modus" 67 | 68 | msgid "Edit this page" 69 | msgstr "Rediger denne siden" 70 | 71 | msgid "By the" 72 | msgstr "Ved" 73 | 74 | msgid "next page" 75 | msgstr "neste side" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/vi/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: vi\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "In sang PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Chủ đề của" 16 | 17 | msgid "Download source file" 18 | msgstr "Tải xuống tệp nguồn" 19 | 20 | msgid "open issue" 21 | msgstr "vấn đề mở" 22 | 23 | msgid "Contents" 24 | msgstr "Nội dung" 25 | 26 | msgid "previous page" 27 | msgstr "trang trước" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Tải xuống tệp sổ tay" 31 | 32 | msgid "Copyright" 33 | msgstr "Bản quyền" 34 | 35 | msgid "Download this page" 36 | msgstr "Tải xuống trang này" 37 | 38 | msgid "Source repository" 39 | msgstr "Kho nguồn" 40 | 41 | msgid "By" 42 | msgstr "Bởi" 43 | 44 | msgid "repository" 45 | msgstr "kho" 46 | 47 | msgid "Last updated on" 48 | msgstr "Cập nhật lần cuối vào" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Chuyển đổi điều hướng thành" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Chủ đề sách nhân sư" 55 | 56 | msgid "suggest edit" 57 | msgstr "đề nghị chỉnh sửa" 58 | 59 | msgid "Open an issue" 60 | msgstr "Mở một vấn đề" 61 | 62 | msgid "Launch" 63 | msgstr "Phóng" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Chế độ toàn màn hình" 67 | 68 | msgid "Edit this page" 69 | msgstr "chỉnh sửa trang này" 70 | 71 | msgid "By the" 72 | msgstr "Bằng" 73 | 74 | msgid "next page" 75 | msgstr "Trang tiếp theo" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/eo/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: eo\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Presi al PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Temo de la" 16 | 17 | msgid "Download source file" 18 | msgstr "Elŝutu fontodosieron" 19 | 20 | msgid "open issue" 21 | msgstr "malferma numero" 22 | 23 | msgid "Contents" 24 | msgstr "Enhavo" 25 | 26 | msgid "previous page" 27 | msgstr "antaŭa paĝo" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Elŝutu kajeran dosieron" 31 | 32 | msgid "Copyright" 33 | msgstr "Kopirajto" 34 | 35 | msgid "Download this page" 36 | msgstr "Elŝutu ĉi tiun paĝon" 37 | 38 | msgid "Source repository" 39 | msgstr "Fonto-deponejo" 40 | 41 | msgid "By" 42 | msgstr "De" 43 | 44 | msgid "repository" 45 | msgstr "deponejo" 46 | 47 | msgid "Last updated on" 48 | msgstr "Laste ĝisdatigita la" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Ŝalti navigadon" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sfinksa Libro-Temo" 55 | 56 | msgid "suggest edit" 57 | msgstr "sugesti redaktadon" 58 | 59 | msgid "Open an issue" 60 | msgstr "Malfermu numeron" 61 | 62 | msgid "Launch" 63 | msgstr "Lanĉo" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Plenekrana reĝimo" 67 | 68 | msgid "Edit this page" 69 | msgstr "Redaktu ĉi tiun paĝon" 70 | 71 | msgid "By the" 72 | msgstr "Per la" 73 | 74 | msgid "next page" 75 | msgstr "sekva paĝo" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/id/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: id\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Cetak ke PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema oleh" 16 | 17 | msgid "Download source file" 18 | msgstr "Unduh file sumber" 19 | 20 | msgid "open issue" 21 | msgstr "masalah terbuka" 22 | 23 | msgid "Contents" 24 | msgstr "Isi" 25 | 26 | msgid "previous page" 27 | msgstr "halaman sebelumnya" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Unduh file notebook" 31 | 32 | msgid "Copyright" 33 | msgstr "hak cipta" 34 | 35 | msgid "Download this page" 36 | msgstr "Unduh halaman ini" 37 | 38 | msgid "Source repository" 39 | msgstr "Repositori sumber" 40 | 41 | msgid "By" 42 | msgstr "Oleh" 43 | 44 | msgid "repository" 45 | msgstr "gudang" 46 | 47 | msgid "Last updated on" 48 | msgstr "Terakhir diperbarui saat" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Alihkan navigasi" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema Buku Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "menyarankan edit" 58 | 59 | msgid "Open an issue" 60 | msgstr "Buka masalah" 61 | 62 | msgid "Launch" 63 | msgstr "Meluncurkan" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Mode layar penuh" 67 | 68 | msgid "Edit this page" 69 | msgstr "Edit halaman ini" 70 | 71 | msgid "By the" 72 | msgstr "Oleh" 73 | 74 | msgid "next page" 75 | msgstr "halaman selanjutnya" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/et/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: et\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Prindi PDF-i" 13 | 14 | msgid "Theme by the" 15 | msgstr "Teema" 16 | 17 | msgid "Download source file" 18 | msgstr "Laadige alla lähtefail" 19 | 20 | msgid "open issue" 21 | msgstr "avatud küsimus" 22 | 23 | msgid "Contents" 24 | msgstr "Sisu" 25 | 26 | msgid "previous page" 27 | msgstr "eelmine leht" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Laadige sülearvuti fail alla" 31 | 32 | msgid "Copyright" 33 | msgstr "Autoriõigus" 34 | 35 | msgid "Download this page" 36 | msgstr "Laadige see leht alla" 37 | 38 | msgid "Source repository" 39 | msgstr "Allikahoidla" 40 | 41 | msgid "By" 42 | msgstr "Kõrval" 43 | 44 | msgid "repository" 45 | msgstr "hoidla" 46 | 47 | msgid "Last updated on" 48 | msgstr "Viimati uuendatud" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Lülita navigeerimine sisse" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sfinksiraamatu teema" 55 | 56 | msgid "suggest edit" 57 | msgstr "soovita muuta" 58 | 59 | msgid "Open an issue" 60 | msgstr "Avage probleem" 61 | 62 | msgid "Launch" 63 | msgstr "Käivitage" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Täisekraanirežiim" 67 | 68 | msgid "Edit this page" 69 | msgstr "Muutke seda lehte" 70 | 71 | msgid "By the" 72 | msgstr "Autor" 73 | 74 | msgid "next page" 75 | msgstr "järgmine leht" 76 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | import numpy as np 4 | from Cython.Build import cythonize 5 | from setuptools import Extension, setup 6 | 7 | if sys.platform == "win32": 8 | allocator_libs = [] # type: ignore 9 | extra_compile_args = ["/openmp", "/O2"] 10 | extra_link_args = ["/openmp"] 11 | elif sys.platform == "darwin": 12 | allocator_libs = ["jemalloc"] 13 | extra_compile_args = [ 14 | "-Xpreprocessor", 15 | "-fopenmp", 16 | "-O3", 17 | "-ffast-math", 18 | "--std=c++17", 19 | ] 20 | extra_link_args = ["-lomp"] 21 | else: 22 | allocator_libs = ["jemalloc"] 23 | extra_compile_args = [ 24 | "-fopenmp", 25 | "-O3", 26 | "-ffast-math", 27 | "--std=c++17", 28 | ] 29 | extra_link_args = ["-fopenmp"] 30 | 31 | extension_args = dict( 32 | include_dirs=[np.get_include()], 33 | extra_compile_args=extra_compile_args, 34 | extra_link_args=extra_link_args, 35 | language="c++", 36 | ) 37 | ext_modules = [ 38 | Extension( 39 | name="coverforest._giqs", 40 | sources=["coverforest/_giqs.pyx"], 41 | **extension_args, 42 | ), 43 | ] 44 | 45 | setup( 46 | ext_modules=cythonize( 47 | ext_modules, 48 | annotate=False, 49 | compiler_directives={ 50 | "language_level": "3", 51 | "boundscheck": False, 52 | "wraparound": False, 53 | "initializedcheck": False, 54 | "nonecheck": False, 55 | "cdivision": True, 56 | "legacy_implicit_noexcept": True, 57 | }, 58 | ), 59 | ) 60 | -------------------------------------------------------------------------------- /docs/_static/locales/tg/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: tg\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Чоп ба PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Мавзӯъи аз" 16 | 17 | msgid "Download source file" 18 | msgstr "Файли манбаъро зеркашӣ кунед" 19 | 20 | msgid "open issue" 21 | msgstr "барориши кушод" 22 | 23 | msgid "Contents" 24 | msgstr "Мундариҷа" 25 | 26 | msgid "previous page" 27 | msgstr "саҳифаи қаблӣ" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Файли дафтарро зеркашӣ кунед" 31 | 32 | msgid "Copyright" 33 | msgstr "Ҳуқуқи муаллиф" 34 | 35 | msgid "Download this page" 36 | msgstr "Ин саҳифаро зеркашӣ кунед" 37 | 38 | msgid "Source repository" 39 | msgstr "Анбори манбаъ" 40 | 41 | msgid "By" 42 | msgstr "Бо" 43 | 44 | msgid "repository" 45 | msgstr "анбор" 46 | 47 | msgid "Last updated on" 48 | msgstr "Last навсозӣ дар" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Гузаришро иваз кунед" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Сфинкс Мавзӯи китоб" 55 | 56 | msgid "suggest edit" 57 | msgstr "пешниҳод вироиш" 58 | 59 | msgid "Open an issue" 60 | msgstr "Масъаларо кушоед" 61 | 62 | msgid "Launch" 63 | msgstr "Оғоз" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Ҳолати экрани пурра" 67 | 68 | msgid "Edit this page" 69 | msgstr "Ин саҳифаро таҳрир кунед" 70 | 71 | msgid "By the" 72 | msgstr "Бо" 73 | 74 | msgid "next page" 75 | msgstr "саҳифаи оянда" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/pl/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: pl\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Drukuj do PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Motyw autorstwa" 16 | 17 | msgid "Download source file" 18 | msgstr "Pobierz plik źródłowy" 19 | 20 | msgid "open issue" 21 | msgstr "otwarty problem" 22 | 23 | msgid "Contents" 24 | msgstr "Zawartość" 25 | 26 | msgid "previous page" 27 | msgstr "Poprzednia strona" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Pobierz plik notatnika" 31 | 32 | msgid "Copyright" 33 | msgstr "prawa autorskie" 34 | 35 | msgid "Download this page" 36 | msgstr "Pobierz tę stronę" 37 | 38 | msgid "Source repository" 39 | msgstr "Repozytorium źródłowe" 40 | 41 | msgid "By" 42 | msgstr "Przez" 43 | 44 | msgid "repository" 45 | msgstr "magazyn" 46 | 47 | msgid "Last updated on" 48 | msgstr "Ostatnia aktualizacja" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Przełącz nawigację" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Motyw książki Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "zaproponuj edycję" 58 | 59 | msgid "Open an issue" 60 | msgstr "Otwórz problem" 61 | 62 | msgid "Launch" 63 | msgstr "Uruchomić" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Pełny ekran" 67 | 68 | msgid "Edit this page" 69 | msgstr "Edytuj tę strone" 70 | 71 | msgid "By the" 72 | msgstr "Przez" 73 | 74 | msgid "next page" 75 | msgstr "Następna strona" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/pt/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: pt\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Imprimir em PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema por" 16 | 17 | msgid "Download source file" 18 | msgstr "Baixar arquivo fonte" 19 | 20 | msgid "open issue" 21 | msgstr "questão aberta" 22 | 23 | msgid "Contents" 24 | msgstr "Conteúdo" 25 | 26 | msgid "previous page" 27 | msgstr "página anterior" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Baixar arquivo de notebook" 31 | 32 | msgid "Copyright" 33 | msgstr "direito autoral" 34 | 35 | msgid "Download this page" 36 | msgstr "Baixe esta página" 37 | 38 | msgid "Source repository" 39 | msgstr "Repositório fonte" 40 | 41 | msgid "By" 42 | msgstr "De" 43 | 44 | msgid "repository" 45 | msgstr "repositório" 46 | 47 | msgid "Last updated on" 48 | msgstr "Última atualização em" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Alternar de navegação" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema do livro Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "sugerir edição" 58 | 59 | msgid "Open an issue" 60 | msgstr "Abra um problema" 61 | 62 | msgid "Launch" 63 | msgstr "Lançamento" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Modo tela cheia" 67 | 68 | msgid "Edit this page" 69 | msgstr "Edite essa página" 70 | 71 | msgid "By the" 72 | msgstr "Pelo" 73 | 74 | msgid "next page" 75 | msgstr "próxima página" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/sv/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: sv\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Skriv ut till PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema av" 16 | 17 | msgid "Download source file" 18 | msgstr "Ladda ner källfil" 19 | 20 | msgid "open issue" 21 | msgstr "öppna problemrapport" 22 | 23 | msgid "Contents" 24 | msgstr "Innehåll" 25 | 26 | msgid "previous page" 27 | msgstr "föregående sida" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Ladda ner notebook-fil" 31 | 32 | msgid "Copyright" 33 | msgstr "Upphovsrätt" 34 | 35 | msgid "Download this page" 36 | msgstr "Ladda ner den här sidan" 37 | 38 | msgid "Source repository" 39 | msgstr "Källkodsrepositorium" 40 | 41 | msgid "By" 42 | msgstr "Av" 43 | 44 | msgid "repository" 45 | msgstr "repositorium" 46 | 47 | msgid "Last updated on" 48 | msgstr "Senast uppdaterad den" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Växla navigering" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx Boktema" 55 | 56 | msgid "suggest edit" 57 | msgstr "föreslå ändring" 58 | 59 | msgid "Open an issue" 60 | msgstr "Öppna en problemrapport" 61 | 62 | msgid "Launch" 63 | msgstr "Öppna" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Fullskärmsläge" 67 | 68 | msgid "Edit this page" 69 | msgstr "Redigera den här sidan" 70 | 71 | msgid "By the" 72 | msgstr "Av den" 73 | 74 | msgid "next page" 75 | msgstr "nästa sida" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/tr/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: tr\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "PDF olarak yazdır" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tarafından tema" 16 | 17 | msgid "Download source file" 18 | msgstr "Kaynak dosyayı indirin" 19 | 20 | msgid "open issue" 21 | msgstr "Açık konu" 22 | 23 | msgid "Contents" 24 | msgstr "İçindekiler" 25 | 26 | msgid "previous page" 27 | msgstr "önceki sayfa" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Defter dosyasını indirin" 31 | 32 | msgid "Copyright" 33 | msgstr "Telif hakkı" 34 | 35 | msgid "Download this page" 36 | msgstr "Bu sayfayı indirin" 37 | 38 | msgid "Source repository" 39 | msgstr "Kaynak kod deposu" 40 | 41 | msgid "By" 42 | msgstr "Tarafından" 43 | 44 | msgid "repository" 45 | msgstr "depo" 46 | 47 | msgid "Last updated on" 48 | msgstr "Son güncelleme tarihi" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Gezinmeyi değiştir" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sfenks Kitap Teması" 55 | 56 | msgid "suggest edit" 57 | msgstr "düzenleme öner" 58 | 59 | msgid "Open an issue" 60 | msgstr "Bir sorunu açın" 61 | 62 | msgid "Launch" 63 | msgstr "Başlatmak" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Tam ekran modu" 67 | 68 | msgid "Edit this page" 69 | msgstr "Bu sayfayı düzenle" 70 | 71 | msgid "By the" 72 | msgstr "Tarafından" 73 | 74 | msgid "next page" 75 | msgstr "sonraki Sayfa" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/fi/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: fi\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Tulosta PDF-tiedostoon" 13 | 14 | msgid "Theme by the" 15 | msgstr "Teeman tekijä" 16 | 17 | msgid "Download source file" 18 | msgstr "Lataa lähdetiedosto" 19 | 20 | msgid "open issue" 21 | msgstr "avoin ongelma" 22 | 23 | msgid "Contents" 24 | msgstr "Sisällys" 25 | 26 | msgid "previous page" 27 | msgstr "Edellinen sivu" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Lataa muistikirjatiedosto" 31 | 32 | msgid "Copyright" 33 | msgstr "Tekijänoikeus" 34 | 35 | msgid "Download this page" 36 | msgstr "Lataa tämä sivu" 37 | 38 | msgid "Source repository" 39 | msgstr "Lähteen arkisto" 40 | 41 | msgid "By" 42 | msgstr "Tekijä" 43 | 44 | msgid "repository" 45 | msgstr "arkisto" 46 | 47 | msgid "Last updated on" 48 | msgstr "Viimeksi päivitetty" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Vaihda navigointia" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx-kirjan teema" 55 | 56 | msgid "suggest edit" 57 | msgstr "ehdottaa muokkausta" 58 | 59 | msgid "Open an issue" 60 | msgstr "Avaa ongelma" 61 | 62 | msgid "Launch" 63 | msgstr "Tuoda markkinoille" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Koko näytön tila" 67 | 68 | msgid "Edit this page" 69 | msgstr "Muokkaa tätä sivua" 70 | 71 | msgid "By the" 72 | msgstr "Mukaan" 73 | 74 | msgid "next page" 75 | msgstr "seuraava sivu" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/nl/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: nl\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Afdrukken naar pdf" 13 | 14 | msgid "Theme by the" 15 | msgstr "Thema door de" 16 | 17 | msgid "Download source file" 18 | msgstr "Download het bronbestand" 19 | 20 | msgid "open issue" 21 | msgstr "open probleem" 22 | 23 | msgid "Contents" 24 | msgstr "Inhoud" 25 | 26 | msgid "previous page" 27 | msgstr "vorige pagina" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Download notebookbestand" 31 | 32 | msgid "Copyright" 33 | msgstr "auteursrechten" 34 | 35 | msgid "Download this page" 36 | msgstr "Download deze pagina" 37 | 38 | msgid "Source repository" 39 | msgstr "Bronopslagplaats" 40 | 41 | msgid "By" 42 | msgstr "Door" 43 | 44 | msgid "repository" 45 | msgstr "repository" 46 | 47 | msgid "Last updated on" 48 | msgstr "Laatst geupdate op" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Schakel navigatie" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx-boekthema" 55 | 56 | msgid "suggest edit" 57 | msgstr "suggereren bewerken" 58 | 59 | msgid "Open an issue" 60 | msgstr "Open een probleem" 61 | 62 | msgid "Launch" 63 | msgstr "Lancering" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Volledig scherm" 67 | 68 | msgid "Edit this page" 69 | msgstr "bewerk deze pagina" 70 | 71 | msgid "By the" 72 | msgstr "Door de" 73 | 74 | msgid "next page" 75 | msgstr "volgende bladzijde" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/sk/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: sk\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Tlač do PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Téma od" 16 | 17 | msgid "Download source file" 18 | msgstr "Stiahnite si zdrojový súbor" 19 | 20 | msgid "open issue" 21 | msgstr "otvorené vydanie" 22 | 23 | msgid "Contents" 24 | msgstr "Obsah" 25 | 26 | msgid "previous page" 27 | msgstr "predchádzajúca strana" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Stiahnite si zošit" 31 | 32 | msgid "Copyright" 33 | msgstr "Autorské práva" 34 | 35 | msgid "Download this page" 36 | msgstr "Stiahnite si túto stránku" 37 | 38 | msgid "Source repository" 39 | msgstr "Zdrojové úložisko" 40 | 41 | msgid "By" 42 | msgstr "Autor:" 43 | 44 | msgid "repository" 45 | msgstr "Úložisko" 46 | 47 | msgid "Last updated on" 48 | msgstr "Posledná aktualizácia dňa" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Prepnúť navigáciu" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Téma knihy Sfinga" 55 | 56 | msgid "suggest edit" 57 | msgstr "navrhnúť úpravu" 58 | 59 | msgid "Open an issue" 60 | msgstr "Otvorte problém" 61 | 62 | msgid "Launch" 63 | msgstr "Spustiť" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Režim celej obrazovky" 67 | 68 | msgid "Edit this page" 69 | msgstr "Upraviť túto stránku" 70 | 71 | msgid "By the" 72 | msgstr "Podľa" 73 | 74 | msgid "next page" 75 | msgstr "ďalšia strana" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/cs/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: cs\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Tisk do PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Téma od" 16 | 17 | msgid "Download source file" 18 | msgstr "Stáhněte si zdrojový soubor" 19 | 20 | msgid "open issue" 21 | msgstr "otevřené číslo" 22 | 23 | msgid "Contents" 24 | msgstr "Obsah" 25 | 26 | msgid "previous page" 27 | msgstr "předchozí stránka" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Stáhnout soubor poznámkového bloku" 31 | 32 | msgid "Copyright" 33 | msgstr "autorská práva" 34 | 35 | msgid "Download this page" 36 | msgstr "Stáhněte si tuto stránku" 37 | 38 | msgid "Source repository" 39 | msgstr "Zdrojové úložiště" 40 | 41 | msgid "By" 42 | msgstr "Podle" 43 | 44 | msgid "repository" 45 | msgstr "úložiště" 46 | 47 | msgid "Last updated on" 48 | msgstr "Naposledy aktualizováno" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Přepnout navigaci" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Téma knihy Sfinga" 55 | 56 | msgid "suggest edit" 57 | msgstr "navrhnout úpravy" 58 | 59 | msgid "Open an issue" 60 | msgstr "Otevřete problém" 61 | 62 | msgid "Launch" 63 | msgstr "Zahájení" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Režim celé obrazovky" 67 | 68 | msgid "Edit this page" 69 | msgstr "Upravit tuto stránku" 70 | 71 | msgid "By the" 72 | msgstr "Podle" 73 | 74 | msgid "next page" 75 | msgstr "další strana" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/lv/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: lv\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Drukāt PDF formātā" 13 | 14 | msgid "Theme by the" 15 | msgstr "Autora tēma" 16 | 17 | msgid "Download source file" 18 | msgstr "Lejupielādēt avota failu" 19 | 20 | msgid "open issue" 21 | msgstr "atklāts jautājums" 22 | 23 | msgid "Contents" 24 | msgstr "Saturs" 25 | 26 | msgid "previous page" 27 | msgstr "iepriekšējā lapa" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Lejupielādēt piezīmju grāmatiņu" 31 | 32 | msgid "Copyright" 33 | msgstr "Autortiesības" 34 | 35 | msgid "Download this page" 36 | msgstr "Lejupielādējiet šo lapu" 37 | 38 | msgid "Source repository" 39 | msgstr "Avota krātuve" 40 | 41 | msgid "By" 42 | msgstr "Autors" 43 | 44 | msgid "repository" 45 | msgstr "krātuve" 46 | 47 | msgid "Last updated on" 48 | msgstr "Pēdējoreiz atjaunināts" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Pārslēgt navigāciju" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sfinksa grāmatas tēma" 55 | 56 | msgid "suggest edit" 57 | msgstr "ieteikt rediģēt" 58 | 59 | msgid "Open an issue" 60 | msgstr "Atveriet problēmu" 61 | 62 | msgid "Launch" 63 | msgstr "Uzsākt" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Pilnekrāna režīms" 67 | 68 | msgid "Edit this page" 69 | msgstr "Rediģēt šo lapu" 70 | 71 | msgid "By the" 72 | msgstr "Ar" 73 | 74 | msgid "next page" 75 | msgstr "nākamā lapaspuse" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/sl/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: sl\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Natisni v PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema avtorja" 16 | 17 | msgid "Download source file" 18 | msgstr "Prenesite izvorno datoteko" 19 | 20 | msgid "open issue" 21 | msgstr "odprto vprašanje" 22 | 23 | msgid "Contents" 24 | msgstr "Vsebina" 25 | 26 | msgid "previous page" 27 | msgstr "Prejšnja stran" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Prenesite datoteko zvezka" 31 | 32 | msgid "Copyright" 33 | msgstr "avtorske pravice" 34 | 35 | msgid "Download this page" 36 | msgstr "Prenesite to stran" 37 | 38 | msgid "Source repository" 39 | msgstr "Izvorno skladišče" 40 | 41 | msgid "By" 42 | msgstr "Avtor" 43 | 44 | msgid "repository" 45 | msgstr "odlagališče" 46 | 47 | msgid "Last updated on" 48 | msgstr "Nazadnje posodobljeno dne" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Preklopi navigacijo" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema knjige Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "predlagajte urejanje" 58 | 59 | msgid "Open an issue" 60 | msgstr "Odprite številko" 61 | 62 | msgid "Launch" 63 | msgstr "Kosilo" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Celozaslonski način" 67 | 68 | msgid "Edit this page" 69 | msgstr "Uredite to stran" 70 | 71 | msgid "By the" 72 | msgstr "Avtor" 73 | 74 | msgid "next page" 75 | msgstr "Naslednja stran" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/ro/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ro\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Imprimați în PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema de" 16 | 17 | msgid "Download source file" 18 | msgstr "Descărcați fișierul sursă" 19 | 20 | msgid "open issue" 21 | msgstr "problema deschisă" 22 | 23 | msgid "Contents" 24 | msgstr "Cuprins" 25 | 26 | msgid "previous page" 27 | msgstr "pagina anterioară" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Descărcați fișierul notebook" 31 | 32 | msgid "Copyright" 33 | msgstr "Drepturi de autor" 34 | 35 | msgid "Download this page" 36 | msgstr "Descarcă această pagină" 37 | 38 | msgid "Source repository" 39 | msgstr "Depozit sursă" 40 | 41 | msgid "By" 42 | msgstr "De" 43 | 44 | msgid "repository" 45 | msgstr "repertoriu" 46 | 47 | msgid "Last updated on" 48 | msgstr "Ultima actualizare la" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Comutare navigare" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema Sphinx Book" 55 | 56 | msgid "suggest edit" 57 | msgstr "sugerează editare" 58 | 59 | msgid "Open an issue" 60 | msgstr "Deschideți o problemă" 61 | 62 | msgid "Launch" 63 | msgstr "Lansa" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Modul ecran întreg" 67 | 68 | msgid "Edit this page" 69 | msgstr "Editați această pagină" 70 | 71 | msgid "By the" 72 | msgstr "Langa" 73 | 74 | msgid "next page" 75 | msgstr "pagina următoare" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/sr/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: sr\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Испис у ПДФ" 13 | 14 | msgid "Theme by the" 15 | msgstr "Тхеме би" 16 | 17 | msgid "Download source file" 18 | msgstr "Преузми изворну датотеку" 19 | 20 | msgid "open issue" 21 | msgstr "отворено издање" 22 | 23 | msgid "Contents" 24 | msgstr "Садржај" 25 | 26 | msgid "previous page" 27 | msgstr "Претходна страница" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Преузмите датотеку бележнице" 31 | 32 | msgid "Copyright" 33 | msgstr "Ауторско право" 34 | 35 | msgid "Download this page" 36 | msgstr "Преузмите ову страницу" 37 | 38 | msgid "Source repository" 39 | msgstr "Изворно спремиште" 40 | 41 | msgid "By" 42 | msgstr "Од стране" 43 | 44 | msgid "repository" 45 | msgstr "спремиште" 46 | 47 | msgid "Last updated on" 48 | msgstr "Последње ажурирање" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Укључи / искључи навигацију" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Тема књиге Спхинк" 55 | 56 | msgid "suggest edit" 57 | msgstr "предложи уређивање" 58 | 59 | msgid "Open an issue" 60 | msgstr "Отворите издање" 61 | 62 | msgid "Launch" 63 | msgstr "Лансирање" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Режим целог екрана" 67 | 68 | msgid "Edit this page" 69 | msgstr "Уредите ову страницу" 70 | 71 | msgid "By the" 72 | msgstr "Од" 73 | 74 | msgid "next page" 75 | msgstr "Следећа страна" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/uk/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: uk\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Друк у форматі PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Тема від" 16 | 17 | msgid "Download source file" 18 | msgstr "Завантажити вихідний файл" 19 | 20 | msgid "open issue" 21 | msgstr "відкритий випуск" 22 | 23 | msgid "Contents" 24 | msgstr "Зміст" 25 | 26 | msgid "previous page" 27 | msgstr "Попередня сторінка" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Завантажте файл блокнота" 31 | 32 | msgid "Copyright" 33 | msgstr "Авторське право" 34 | 35 | msgid "Download this page" 36 | msgstr "Завантажте цю сторінку" 37 | 38 | msgid "Source repository" 39 | msgstr "Джерело сховища" 40 | 41 | msgid "By" 42 | msgstr "Автор" 43 | 44 | msgid "repository" 45 | msgstr "сховище" 46 | 47 | msgid "Last updated on" 48 | msgstr "Останнє оновлення:" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Переключити навігацію" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Тема книги \"Сфінкс\"" 55 | 56 | msgid "suggest edit" 57 | msgstr "запропонувати редагувати" 58 | 59 | msgid "Open an issue" 60 | msgstr "Відкрийте випуск" 61 | 62 | msgid "Launch" 63 | msgstr "Запуск" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Повноекранний режим" 67 | 68 | msgid "Edit this page" 69 | msgstr "Редагувати цю сторінку" 70 | 71 | msgid "By the" 72 | msgstr "По" 73 | 74 | msgid "next page" 75 | msgstr "Наступна сторінка" 76 | -------------------------------------------------------------------------------- /coverforest/tests/test_common.py: -------------------------------------------------------------------------------- 1 | """This file shows how to write test based on the scikit-learn common tests.""" 2 | 3 | # Authors: scikit-learn-contrib developers 4 | # License: BSD 3 clause 5 | 6 | from sklearn.utils.estimator_checks import parametrize_with_checks 7 | 8 | from coverforest import CoverForestClassifier, CoverForestRegressor 9 | 10 | 11 | def report_failed_check_bootstrap(estimator): 12 | if hasattr(estimator, "bootstrap"): 13 | if estimator.bootstrap: 14 | return { 15 | "check_sample_weight_equivalence_on_dense_data": ( 16 | "Known issue of bootstrap subsampling" 17 | "incorrectly handling sample weights." 18 | ), 19 | "check_sample_weight_equivalence_on_sparse_data": ( 20 | "Known issue of bootstrap subsampling" 21 | "incorrectly handling sample weights." 22 | ), 23 | } 24 | return {} 25 | 26 | 27 | # parametrize_with_checks allows to get a generator of check that is more fine-grained 28 | # than check_estimator 29 | @parametrize_with_checks( 30 | [ 31 | CoverForestClassifier(method="cv"), 32 | CoverForestClassifier(method="bootstrap"), 33 | CoverForestClassifier(method="split"), 34 | CoverForestRegressor(method="cv"), 35 | CoverForestRegressor(method="bootstrap"), 36 | CoverForestRegressor(method="split"), 37 | ], 38 | expected_failed_checks=report_failed_check_bootstrap, 39 | ) 40 | def test_estimators(estimator, check, request): 41 | """Check the compatibility with scikit-learn API""" 42 | check(estimator) 43 | -------------------------------------------------------------------------------- /docs/_static/locales/de/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: de\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "In PDF drucken" 13 | 14 | msgid "Theme by the" 15 | msgstr "Thema von der" 16 | 17 | msgid "Download source file" 18 | msgstr "Quelldatei herunterladen" 19 | 20 | msgid "open issue" 21 | msgstr "offenes Thema" 22 | 23 | msgid "Contents" 24 | msgstr "Inhalt" 25 | 26 | msgid "previous page" 27 | msgstr "vorherige Seite" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Notebook-Datei herunterladen" 31 | 32 | msgid "Copyright" 33 | msgstr "Urheberrechte ©" 34 | 35 | msgid "Download this page" 36 | msgstr "Laden Sie diese Seite herunter" 37 | 38 | msgid "Source repository" 39 | msgstr "Quell-Repository" 40 | 41 | msgid "By" 42 | msgstr "Durch" 43 | 44 | msgid "repository" 45 | msgstr "Repository" 46 | 47 | msgid "Last updated on" 48 | msgstr "Zuletzt aktualisiert am" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Navigation umschalten" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sphinx-Buch-Thema" 55 | 56 | msgid "suggest edit" 57 | msgstr "vorschlagen zu bearbeiten" 58 | 59 | msgid "Open an issue" 60 | msgstr "Öffnen Sie ein Problem" 61 | 62 | msgid "Launch" 63 | msgstr "Starten" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Vollbildmodus" 67 | 68 | msgid "Edit this page" 69 | msgstr "Bearbeite diese Seite" 70 | 71 | msgid "By the" 72 | msgstr "Bis zum" 73 | 74 | msgid "next page" 75 | msgstr "Nächste Seite" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/bg/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: bg\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Печат в PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Тема от" 16 | 17 | msgid "Download source file" 18 | msgstr "Изтеглете изходния файл" 19 | 20 | msgid "open issue" 21 | msgstr "отворен брой" 22 | 23 | msgid "Contents" 24 | msgstr "Съдържание" 25 | 26 | msgid "previous page" 27 | msgstr "предишна страница" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Изтеглете файла на бележника" 31 | 32 | msgid "Copyright" 33 | msgstr "Авторско право" 34 | 35 | msgid "Download this page" 36 | msgstr "Изтеглете тази страница" 37 | 38 | msgid "Source repository" 39 | msgstr "Хранилище на източника" 40 | 41 | msgid "By" 42 | msgstr "От" 43 | 44 | msgid "repository" 45 | msgstr "хранилище" 46 | 47 | msgid "Last updated on" 48 | msgstr "Последна актуализация на" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Превключване на навигацията" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Тема на книгата Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "предложи редактиране" 58 | 59 | msgid "Open an issue" 60 | msgstr "Отворете проблем" 61 | 62 | msgid "Launch" 63 | msgstr "Стартиране" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Режим на цял екран" 67 | 68 | msgid "Edit this page" 69 | msgstr "Редактирайте тази страница" 70 | 71 | msgid "By the" 72 | msgstr "По" 73 | 74 | msgid "next page" 75 | msgstr "Следваща страница" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/hr/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: hr\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Ispis u PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema autora" 16 | 17 | msgid "Download source file" 18 | msgstr "Preuzmi izvornu datoteku" 19 | 20 | msgid "open issue" 21 | msgstr "otvoreno izdanje" 22 | 23 | msgid "Contents" 24 | msgstr "Sadržaj" 25 | 26 | msgid "previous page" 27 | msgstr "Prethodna stranica" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Preuzmi datoteku bilježnice" 31 | 32 | msgid "Copyright" 33 | msgstr "Autorska prava" 34 | 35 | msgid "Download this page" 36 | msgstr "Preuzmite ovu stranicu" 37 | 38 | msgid "Source repository" 39 | msgstr "Izvorno spremište" 40 | 41 | msgid "By" 42 | msgstr "Po" 43 | 44 | msgid "repository" 45 | msgstr "spremište" 46 | 47 | msgid "Last updated on" 48 | msgstr "Posljednje ažuriranje:" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Uključi / isključi navigaciju" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema knjige Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "predloži uređivanje" 58 | 59 | msgid "Open an issue" 60 | msgstr "Otvorite izdanje" 61 | 62 | msgid "Launch" 63 | msgstr "Pokrenite" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Način preko cijelog zaslona" 67 | 68 | msgid "Edit this page" 69 | msgstr "Uredite ovu stranicu" 70 | 71 | msgid "By the" 72 | msgstr "Od strane" 73 | 74 | msgid "next page" 75 | msgstr "sljedeća stranica" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/lt/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: lt\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Spausdinti į PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema" 16 | 17 | msgid "Download source file" 18 | msgstr "Atsisiųsti šaltinio failą" 19 | 20 | msgid "open issue" 21 | msgstr "atviras klausimas" 22 | 23 | msgid "Contents" 24 | msgstr "Turinys" 25 | 26 | msgid "previous page" 27 | msgstr "Ankstesnis puslapis" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Atsisiųsti nešiojamojo kompiuterio failą" 31 | 32 | msgid "Copyright" 33 | msgstr "Autorių teisės" 34 | 35 | msgid "Download this page" 36 | msgstr "Atsisiųskite šį puslapį" 37 | 38 | msgid "Source repository" 39 | msgstr "Šaltinio saugykla" 40 | 41 | msgid "By" 42 | msgstr "Iki" 43 | 44 | msgid "repository" 45 | msgstr "saugykla" 46 | 47 | msgid "Last updated on" 48 | msgstr "Paskutinį kartą atnaujinta" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Perjungti naršymą" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Sfinkso knygos tema" 55 | 56 | msgid "suggest edit" 57 | msgstr "pasiūlyti redaguoti" 58 | 59 | msgid "Open an issue" 60 | msgstr "Atidarykite problemą" 61 | 62 | msgid "Launch" 63 | msgstr "Paleiskite" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Pilno ekrano režimas" 67 | 68 | msgid "Edit this page" 69 | msgstr "Redaguoti šį puslapį" 70 | 71 | msgid "By the" 72 | msgstr "Prie" 73 | 74 | msgid "next page" 75 | msgstr "Kitas puslapis" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/ru/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: ru\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Распечатать в PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Тема от" 16 | 17 | msgid "Download source file" 18 | msgstr "Скачать исходный файл" 19 | 20 | msgid "open issue" 21 | msgstr "открытый вопрос" 22 | 23 | msgid "Contents" 24 | msgstr "Содержание" 25 | 26 | msgid "previous page" 27 | msgstr "Предыдущая страница" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Скачать файл записной книжки" 31 | 32 | msgid "Copyright" 33 | msgstr "авторское право" 34 | 35 | msgid "Download this page" 36 | msgstr "Загрузите эту страницу" 37 | 38 | msgid "Source repository" 39 | msgstr "Исходный репозиторий" 40 | 41 | msgid "By" 42 | msgstr "По" 43 | 44 | msgid "repository" 45 | msgstr "хранилище" 46 | 47 | msgid "Last updated on" 48 | msgstr "Последнее обновление" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Переключить навигацию" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Тема книги Сфинкс" 55 | 56 | msgid "suggest edit" 57 | msgstr "предложить редактировать" 58 | 59 | msgid "Open an issue" 60 | msgstr "Открыть вопрос" 61 | 62 | msgid "Launch" 63 | msgstr "Запуск" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Полноэкранный режим" 67 | 68 | msgid "Edit this page" 69 | msgstr "Редактировать эту страницу" 70 | 71 | msgid "By the" 72 | msgstr "Посредством" 73 | 74 | msgid "next page" 75 | msgstr "Следующая страница" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/el/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: el\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Εκτύπωση σε PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Θέμα από το" 16 | 17 | msgid "Download source file" 18 | msgstr "Λήψη αρχείου προέλευσης" 19 | 20 | msgid "open issue" 21 | msgstr "ανοιχτό ζήτημα" 22 | 23 | msgid "Contents" 24 | msgstr "Περιεχόμενα" 25 | 26 | msgid "previous page" 27 | msgstr "προηγούμενη σελίδα" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Λήψη αρχείου σημειωματάριου" 31 | 32 | msgid "Copyright" 33 | msgstr "Πνευματική ιδιοκτησία" 34 | 35 | msgid "Download this page" 36 | msgstr "Λήψη αυτής της σελίδας" 37 | 38 | msgid "Source repository" 39 | msgstr "Αποθήκη πηγής" 40 | 41 | msgid "By" 42 | msgstr "Με" 43 | 44 | msgid "repository" 45 | msgstr "αποθήκη" 46 | 47 | msgid "Last updated on" 48 | msgstr "Τελευταία ενημέρωση στις" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Εναλλαγή πλοήγησης" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Θέμα βιβλίου Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "προτείνω επεξεργασία" 58 | 59 | msgid "Open an issue" 60 | msgstr "Ανοίξτε ένα ζήτημα" 61 | 62 | msgid "Launch" 63 | msgstr "Εκτόξευση" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "ΛΕΙΤΟΥΡΓΙΑ ΠΛΗΡΟΥΣ ΟΘΟΝΗΣ" 67 | 68 | msgid "Edit this page" 69 | msgstr "Επεξεργαστείτε αυτήν τη σελίδα" 70 | 71 | msgid "By the" 72 | msgstr "Από το" 73 | 74 | msgid "next page" 75 | msgstr "επόμενη σελίδα" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/es/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: es\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Imprimir en PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema por el" 16 | 17 | msgid "Download source file" 18 | msgstr "Descargar archivo fuente" 19 | 20 | msgid "open issue" 21 | msgstr "Tema abierto" 22 | 23 | msgid "Contents" 24 | msgstr "Contenido" 25 | 26 | msgid "previous page" 27 | msgstr "pagina anterior" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Descargar archivo de cuaderno" 31 | 32 | msgid "Copyright" 33 | msgstr "Derechos de autor" 34 | 35 | msgid "Download this page" 36 | msgstr "Descarga esta pagina" 37 | 38 | msgid "Source repository" 39 | msgstr "Repositorio de origen" 40 | 41 | msgid "By" 42 | msgstr "Por" 43 | 44 | msgid "repository" 45 | msgstr "repositorio" 46 | 47 | msgid "Last updated on" 48 | msgstr "Ultima actualización en" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Navegación de palanca" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema del libro de la esfinge" 55 | 56 | msgid "suggest edit" 57 | msgstr "sugerir editar" 58 | 59 | msgid "Open an issue" 60 | msgstr "Abrir un problema" 61 | 62 | msgid "Launch" 63 | msgstr "Lanzamiento" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Modo de pantalla completa" 67 | 68 | msgid "Edit this page" 69 | msgstr "Edita esta página" 70 | 71 | msgid "By the" 72 | msgstr "Por el" 73 | 74 | msgid "next page" 75 | msgstr "siguiente página" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/fr/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: fr\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Imprimer au format PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Thème par le" 16 | 17 | msgid "Download source file" 18 | msgstr "Télécharger le fichier source" 19 | 20 | msgid "open issue" 21 | msgstr "signaler un problème" 22 | 23 | msgid "Contents" 24 | msgstr "Contenu" 25 | 26 | msgid "previous page" 27 | msgstr "page précédente" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Télécharger le fichier notebook" 31 | 32 | msgid "Copyright" 33 | msgstr "droits d'auteur" 34 | 35 | msgid "Download this page" 36 | msgstr "Téléchargez cette page" 37 | 38 | msgid "Source repository" 39 | msgstr "Dépôt source" 40 | 41 | msgid "By" 42 | msgstr "Par" 43 | 44 | msgid "repository" 45 | msgstr "dépôt" 46 | 47 | msgid "Last updated on" 48 | msgstr "Dernière mise à jour le" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Basculer la navigation" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Thème du livre Sphinx" 55 | 56 | msgid "suggest edit" 57 | msgstr "suggestion de modification" 58 | 59 | msgid "Open an issue" 60 | msgstr "Ouvrez un problème" 61 | 62 | msgid "Launch" 63 | msgstr "lancement" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Mode plein écran" 67 | 68 | msgid "Edit this page" 69 | msgstr "Modifier cette page" 70 | 71 | msgid "By the" 72 | msgstr "Par le" 73 | 74 | msgid "next page" 75 | msgstr "page suivante" 76 | -------------------------------------------------------------------------------- /docs/_static/locales/it/LC_MESSAGES/booktheme.po: -------------------------------------------------------------------------------- 1 | 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Sphinx-Book-Theme\n" 5 | "MIME-Version: 1.0\n" 6 | "Content-Type: text/plain; charset=UTF-8\n" 7 | "Content-Transfer-Encoding: 8bit\n" 8 | "Language: it\n" 9 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 10 | 11 | msgid "Print to PDF" 12 | msgstr "Stampa in PDF" 13 | 14 | msgid "Theme by the" 15 | msgstr "Tema di" 16 | 17 | msgid "Download source file" 18 | msgstr "Scarica il file sorgente" 19 | 20 | msgid "open issue" 21 | msgstr "questione aperta" 22 | 23 | msgid "Contents" 24 | msgstr "Contenuti" 25 | 26 | msgid "previous page" 27 | msgstr "pagina precedente" 28 | 29 | msgid "Download notebook file" 30 | msgstr "Scarica il file del taccuino" 31 | 32 | msgid "Copyright" 33 | msgstr "Diritto d'autore" 34 | 35 | msgid "Download this page" 36 | msgstr "Scarica questa pagina" 37 | 38 | msgid "Source repository" 39 | msgstr "Repository di origine" 40 | 41 | msgid "By" 42 | msgstr "Di" 43 | 44 | msgid "repository" 45 | msgstr "repository" 46 | 47 | msgid "Last updated on" 48 | msgstr "Ultimo aggiornamento il" 49 | 50 | msgid "Toggle navigation" 51 | msgstr "Attiva / disattiva la navigazione" 52 | 53 | msgid "Sphinx Book Theme" 54 | msgstr "Tema del libro della Sfinge" 55 | 56 | msgid "suggest edit" 57 | msgstr "suggerisci modifica" 58 | 59 | msgid "Open an issue" 60 | msgstr "Apri un problema" 61 | 62 | msgid "Launch" 63 | msgstr "Lanciare" 64 | 65 | msgid "Fullscreen mode" 66 | msgstr "Modalità schermo intero" 67 | 68 | msgid "Edit this page" 69 | msgstr "Modifica questa pagina" 70 | 71 | msgid "By the" 72 | msgstr "Dal" 73 | 74 | msgid "next page" 75 | msgstr "pagina successiva" 76 | -------------------------------------------------------------------------------- /docs/_static/images/logo_jupyterhub.svg: -------------------------------------------------------------------------------- 1 | logo_jupyterhubHub 2 | -------------------------------------------------------------------------------- /docs/_static/scripts/sphinx-book-theme.js: -------------------------------------------------------------------------------- 1 | (()=>{"use strict";var e=e=>{"loading"!=document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",(function(){"complete"==document.readyState&&e()}))};window.initThebeSBT=()=>{var e=document.querySelector("section h1");e.nextElementSibling.classList.contains("thebe-launch-button")||e.insertAdjacentHTML("afterend",""),initThebe()},window.toggleFullScreen=()=>{var e=document.fullscreenElement&&null!==document.fullscreenElement||document.webkitFullscreenElement&&null!==document.webkitFullscreenElement;let t=document.documentElement;e?(console.log("[SBT]: Exiting full screen"),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()):(console.log("[SBT]: Entering full screen"),t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen())},e((()=>{var e=[];let t=new IntersectionObserver(((t,n)=>{t.forEach((t=>{if(t.isIntersecting)e.push(t.target);else for(let n=0;n0?document.querySelector("div.bd-sidebar-secondary").classList.add("hide"):document.querySelector("div.bd-sidebar-secondary").classList.remove("hide")}),{rootMargin:"0px 0px -33% 0px"}),n=[];["marginnote","sidenote","margin","margin-caption","full-width","sidebar","popout"].forEach((e=>{n.push(`.${e}`,`.tag_${e}`,`.${e.replace("-","_")}`,`.tag_${e.replace("-","_")}`)})),document.querySelectorAll(n.join(", ")).forEach((e=>{t.observe(e)})),new IntersectionObserver(((e,t)=>{e[0].boundingClientRect.y<0?document.body.classList.add("scrolled"):document.body.classList.remove("scrolled")})).observe(document.querySelector(".sbt-scroll-pixel-helper"))})),e((function(){var e=[".bd-header-announcement",".bd-header",".bd-header-article",".bd-sidebar-primary",".bd-sidebar-secondary",".bd-footer-article",".bd-footer-content",".bd-footer"].join(",");document.querySelectorAll(e).forEach((e=>{e.classList.add("noprint")}))}))})(); 2 | //# sourceMappingURL=sphinx-book-theme.js.map 3 | -------------------------------------------------------------------------------- /docs/_static/copybutton.css: -------------------------------------------------------------------------------- 1 | /* Copy buttons */ 2 | button.copybtn { 3 | position: absolute; 4 | display: flex; 5 | top: .3em; 6 | right: .3em; 7 | width: 1.7em; 8 | height: 1.7em; 9 | opacity: 0; 10 | transition: opacity 0.3s, border .3s, background-color .3s; 11 | user-select: none; 12 | padding: 0; 13 | border: none; 14 | outline: none; 15 | border-radius: 0.4em; 16 | /* The colors that GitHub uses */ 17 | border: #1b1f2426 1px solid; 18 | background-color: #f6f8fa; 19 | color: #57606a; 20 | } 21 | 22 | button.copybtn.success { 23 | border-color: #22863a; 24 | color: #22863a; 25 | } 26 | 27 | button.copybtn svg { 28 | stroke: currentColor; 29 | width: 1.5em; 30 | height: 1.5em; 31 | padding: 0.1em; 32 | } 33 | 34 | div.highlight { 35 | position: relative; 36 | } 37 | 38 | /* Show the copybutton */ 39 | .highlight:hover button.copybtn, button.copybtn.success { 40 | opacity: 1; 41 | } 42 | 43 | .highlight button.copybtn:hover { 44 | background-color: rgb(235, 235, 235); 45 | } 46 | 47 | .highlight button.copybtn:active { 48 | background-color: rgb(187, 187, 187); 49 | } 50 | 51 | /** 52 | * A minimal CSS-only tooltip copied from: 53 | * https://codepen.io/mildrenben/pen/rVBrpK 54 | * 55 | * To use, write HTML like the following: 56 | * 57 | *

Short

58 | */ 59 | .o-tooltip--left { 60 | position: relative; 61 | } 62 | 63 | .o-tooltip--left:after { 64 | opacity: 0; 65 | visibility: hidden; 66 | position: absolute; 67 | content: attr(data-tooltip); 68 | padding: .2em; 69 | font-size: .8em; 70 | left: -.2em; 71 | background: grey; 72 | color: white; 73 | white-space: nowrap; 74 | z-index: 2; 75 | border-radius: 2px; 76 | transform: translateX(-102%) translateY(0); 77 | transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); 78 | } 79 | 80 | .o-tooltip--left:hover:after { 81 | display: block; 82 | opacity: 1; 83 | visibility: visible; 84 | transform: translateX(-100%) translateY(0); 85 | transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); 86 | transition-delay: .5s; 87 | } 88 | 89 | /* By default the copy button shouldn't show up when printing a page */ 90 | @media print { 91 | button.copybtn { 92 | display: none; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /docs/_static/copybutton_funcs.js: -------------------------------------------------------------------------------- 1 | function escapeRegExp(string) { 2 | return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string 3 | } 4 | 5 | /** 6 | * Removes excluded text from a Node. 7 | * 8 | * @param {Node} target Node to filter. 9 | * @param {string} exclude CSS selector of nodes to exclude. 10 | * @returns {DOMString} Text from `target` with text removed. 11 | */ 12 | export function filterText(target, exclude) { 13 | const clone = target.cloneNode(true); // clone as to not modify the live DOM 14 | if (exclude) { 15 | // remove excluded nodes 16 | clone.querySelectorAll(exclude).forEach(node => node.remove()); 17 | } 18 | return clone.innerText; 19 | } 20 | 21 | // Callback when a copy button is clicked. Will be passed the node that was clicked 22 | // should then grab the text and replace pieces of text that shouldn't be used in output 23 | export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { 24 | var regexp; 25 | var match; 26 | 27 | // Do we check for line continuation characters and "HERE-documents"? 28 | var useLineCont = !!lineContinuationChar 29 | var useHereDoc = !!hereDocDelim 30 | 31 | // create regexp to capture prompt and remaining line 32 | if (isRegexp) { 33 | regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') 34 | } else { 35 | regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') 36 | } 37 | 38 | const outputLines = []; 39 | var promptFound = false; 40 | var gotLineCont = false; 41 | var gotHereDoc = false; 42 | const lineGotPrompt = []; 43 | for (const line of textContent.split('\n')) { 44 | match = line.match(regexp) 45 | if (match || gotLineCont || gotHereDoc) { 46 | promptFound = regexp.test(line) 47 | lineGotPrompt.push(promptFound) 48 | if (removePrompts && promptFound) { 49 | outputLines.push(match[2]) 50 | } else { 51 | outputLines.push(line) 52 | } 53 | gotLineCont = line.endsWith(lineContinuationChar) & useLineCont 54 | if (line.includes(hereDocDelim) & useHereDoc) 55 | gotHereDoc = !gotHereDoc 56 | } else if (!onlyCopyPromptLines) { 57 | outputLines.push(line) 58 | } else if (copyEmptyLines && line.trim() === '') { 59 | outputLines.push(line) 60 | } 61 | } 62 | 63 | // If no lines with the prompt were found then just use original lines 64 | if (lineGotPrompt.some(v => v === true)) { 65 | textContent = outputLines.join('\n'); 66 | } 67 | 68 | // Remove a trailing newline to avoid auto-running when pasting 69 | if (textContent.endsWith("\n")) { 70 | textContent = textContent.slice(0, -1) 71 | } 72 | return textContent 73 | } 74 | -------------------------------------------------------------------------------- /docs/_static/js/copybutton.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | /* Add a [>>>] button on the top-right corner of code samples to hide 3 | * the >>> and ... prompts and the output and thus make the code 4 | * copyable. */ 5 | var div = $('.highlight-python .highlight,' + 6 | '.highlight-python3 .highlight,' + 7 | '.highlight-pycon .highlight,' + 8 | '.highlight-default .highlight') 9 | var pre = div.find('pre'); 10 | 11 | // get the styles from the current theme 12 | pre.parent().parent().css('position', 'relative'); 13 | var hide_text = 'Hide the prompts and output'; 14 | var show_text = 'Show the prompts and output'; 15 | var border_width = pre.css('border-top-width'); 16 | var border_style = pre.css('border-top-style'); 17 | var border_color = pre.css('border-top-color'); 18 | var button_styles = { 19 | 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', 20 | 'border-color': border_color, 'border-style': border_style, 21 | 'border-width': border_width, 'color': border_color, 'text-size': '75%', 22 | 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', 23 | 'border-radius': '0 3px 0 0' 24 | } 25 | 26 | // create and add the button to all the code blocks that contain >>> 27 | div.each(function(index) { 28 | var jthis = $(this); 29 | if (jthis.find('.gp').length > 0) { 30 | var button = $('>>>'); 31 | button.css(button_styles) 32 | button.attr('title', hide_text); 33 | button.data('hidden', 'false'); 34 | jthis.prepend(button); 35 | } 36 | // tracebacks (.gt) contain bare text elements that need to be 37 | // wrapped in a span to work with .nextUntil() (see later) 38 | jthis.find('pre:has(.gt)').contents().filter(function() { 39 | return ((this.nodeType == 3) && (this.data.trim().length > 0)); 40 | }).wrap(''); 41 | }); 42 | 43 | // define the behavior of the button when it's clicked 44 | $('.copybutton').click(function(e){ 45 | e.preventDefault(); 46 | var button = $(this); 47 | if (button.data('hidden') === 'false') { 48 | // hide the code output 49 | button.parent().find('.go, .gp, .gt').hide(); 50 | button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); 51 | button.css('text-decoration', 'line-through'); 52 | button.attr('title', show_text); 53 | button.data('hidden', 'true'); 54 | } else { 55 | // show the code output 56 | button.parent().find('.go, .gp, .gt').show(); 57 | button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); 58 | button.css('text-decoration', 'none'); 59 | button.attr('title', hide_text); 60 | button.data('hidden', 'false'); 61 | } 62 | }); 63 | }); 64 | -------------------------------------------------------------------------------- /docs/_sources/index.rst: -------------------------------------------------------------------------------- 1 | ########### 2 | coverforest 3 | ########### 4 | 5 | **coverforest** is a Python library that extends scikit-learn's random forest implementation to provide prediction sets/intervals with guaranteed coverage using conformal prediction methods. It offers a simple and efficient way to get uncertainty estimates for both classification and regression tasks. 6 | 7 | **Useful links**: 8 | `Source Repository `__ | 9 | `Issues & Ideas `__ | 10 | 11 | Key Features 12 | ============ 13 | - Scikit-learn compatible API 14 | - Three conformal prediction methods: 15 | - CV+ (Cross-Validation+) [1]_ [2]_ 16 | - Jackknife+-after-Bootstrap [3]_ 17 | - Split Conformal [4]_ 18 | - Efficient conformity score calculation with parallel processing support 19 | - Regularized set predictions for classification tasks [5]_ 20 | 21 | Installation 22 | ============ 23 | 24 | You can install **coverforest** using pip: 25 | 26 | .. code-block:: bash 27 | 28 | pip install coverforest 29 | 30 | Requirements: 31 | 32 | - Python >=3.9 33 | - Scikit-learn >=1.6.0 34 | 35 | Quick Start 36 | =========== 37 | 38 | Classification Example 39 | ---------------------- 40 | .. code-block:: python 41 | 42 | from coverforest import CoverForestClassifier 43 | 44 | clf = CoverForestClassifier(n_estimators=100, method='cv') # using CV+ 45 | clf.fit(X_train, y_train) 46 | y_pred, y_sets = clf.predict(X_test, alpha=0.05) # 95% coverage sets 47 | 48 | Regression Example 49 | ------------------ 50 | .. code-block:: python 51 | 52 | from coverforest import CoverForestRegressor 53 | 54 | reg = CoverForestRegressor(n_estimators=100, method='bootstrap') # using J+-a-Bootstrap 55 | reg.fit(X_train, y_train) 56 | y_pred, y_intervals = reg.predict(X_test, alpha=0.05) # 95% coverage intervals 57 | 58 | 59 | Performance Tips 60 | ================ 61 | 62 | - Use the ``n_jobs`` parameter in ``fit()`` and ``predict()`` to control parallel processing (``n_jobs=-1`` uses all CPU cores) 63 | - For large test sets, consider batch processing to optimize memory usage when calculating conformity scores 64 | - The memory requirement for prediction scales with ``(n_train × n_test × n_classes)`` 65 | 66 | References 67 | ========== 68 | 69 | .. [1] Romano, Y., Sesia, M., & Candès, E. J. (2020). Classification with Valid and Adaptive Coverage. NeurIPS 2020. 70 | .. [2] Barber, R. F., Candès, E. J., Ramdas, A., & Tibshirani, R. J. (2021). Predictive inference with the jackknife+. Ann. Statist. 49(1), 486-507. 71 | .. [3] Kim, B., Xu, C., & Barber, R. F. (2020). Predictive inference is free with the jackknife+-after-bootstrap. NeurIPS 2020. 72 | .. [4] Vovk, V., Nouretdinov, I., Manokhin, V., & Gammerman, A. (2018). Cross-conformal predictive distributions. COPA 2018, 37-51. 73 | .. [5] Angelopoulos, A. N., Bates, S., Jordan, M. I., & Malik, J. (2021). Uncertainty Sets for Image Classifiers using Conformal Prediction. ICLR 2021. 74 | 75 | .. toctree:: 76 | :maxdepth: 3 77 | :hidden: 78 | 79 | classification/index 80 | regression/index 81 | api 82 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools>=64", "setuptools_scm[toml]>=8", "Cython", "numpy>=1.26", "scikit-learn>=1.6.0"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "coverforest" 7 | version = "0.0.4" 8 | authors = [ 9 | { name="Donlapark Ponnoprat", email="donlapark@gmail.com" }, 10 | ] 11 | description = "A simple and fast sklearn-compatible conformal predictions with random forests for both classification and regression tasks." 12 | readme = "README.md" 13 | requires-python = ">=3.9" 14 | dependencies = [ 15 | "scikit-learn>=1.6.0", 16 | ] 17 | classifiers = [ 18 | "Programming Language :: Python :: 3", 19 | "Programming Language :: Python :: 3.9", 20 | "Programming Language :: Python :: 3.10", 21 | "Programming Language :: Python :: 3.11", 22 | "Programming Language :: Python :: 3.12", 23 | "License :: OSI Approved :: BSD License", 24 | "Operating System :: POSIX", 25 | "Operating System :: Unix", 26 | "Operating System :: MacOS", 27 | "Operating System :: Microsoft :: Windows", 28 | ] 29 | 30 | [project.urls] 31 | Homepage = "https://github.com/donlapark/coverforest" 32 | Issues = "https://github.com/donlapark/coverforest/issues" 33 | 34 | [tool.setuptools] 35 | packages.find.exclude = [ 36 | "doc*", 37 | 'coverforest*tests', 38 | "docs*", 39 | "notebooks*", 40 | "wheels", 41 | "wheelhouse", 42 | "images", 43 | "experiments*", 44 | ] 45 | 46 | [tool.setuptools_scm] 47 | version_file = "coverforest/_version.py" 48 | 49 | [tool.pixi.project] 50 | channels = ["conda-forge"] 51 | platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"] 52 | 53 | [tool.pixi.dependencies] 54 | python = ">=3.9" 55 | scikit-learn = ">=1.6.0" 56 | 57 | [tool.pixi.pypi-dependencies] 58 | coverforest = { path=".", editable=true } 59 | 60 | [tool.pixi.feature.lint.dependencies] 61 | # The version below should be aligned with the one of `.pre-commit-config.yaml` 62 | black = "23.3.0" 63 | pre-commit = "4.0.1" 64 | ruff = "0.9.1" 65 | 66 | [tool.pixi.feature.lint.tasks] 67 | black = { cmd = "black --check --diff coverforest && black --check --diff examples" } 68 | ruff = { cmd = "ruff check --output-format=full coverforest && ruff check --output-format=full examples" } 69 | lint = { depends-on = ["black", "ruff"]} 70 | 71 | [tool.pixi.feature.test.dependencies] 72 | pytest = "*" 73 | pytest-cov = "*" 74 | 75 | [tool.pixi.feature.test.tasks] 76 | test = { cmd = "pytest -vsl --cov=coverforest --cov-report=xml coverforest" } 77 | 78 | [tool.pixi.feature.doc.dependencies] 79 | matplotlib = "*" 80 | numpydoc = "*" 81 | pandas = "*" 82 | sphinx-book-theme = "*" 83 | setuptools-scm = ">=8" # needed for the versioning 84 | sphinx = "*" 85 | sphinx-design = "*" 86 | sphinx-gallery = "*" 87 | sphinx-prompt = "*" 88 | sphinxcontrib-bibtex = "*" 89 | sphinx-copybutton = "*" 90 | myst-nb = "*" 91 | 92 | [tool.pixi.feature.doc.tasks] 93 | build-doc = { cmd = "make html", cwd = "doc" } 94 | clean-doc = { cmd = "rm -rf _build", cwd = "doc" } 95 | 96 | [tool.pixi.environments] 97 | doc = ["doc"] 98 | lint = ["lint"] 99 | test = ["test"] 100 | dev = ["doc", "lint", "test"] 101 | 102 | [tool.black] 103 | line-length = 88 104 | target_version = ['py38', 'py39', 'py310'] 105 | preview = true 106 | exclude = ''' 107 | /( 108 | \.eggs # exclude a few common directories in the 109 | | \.git # root of the project 110 | | \.vscode 111 | )/ 112 | ''' 113 | force-exclude = "coverforest/_version.py" 114 | 115 | [tool.ruff] 116 | # max line length for black 117 | line-length = 88 118 | target-version = "py38" 119 | exclude=[ 120 | ".git", 121 | "__pycache__", 122 | "dist", 123 | "doc/_build", 124 | "doc/auto_examples", 125 | "experiments", 126 | "build", 127 | "coverforest/_version.py", 128 | ] 129 | 130 | [tool.ruff.lint] 131 | # all rules can be found here: https://beta.ruff.rs/docs/rules/ 132 | select = ["E", "F", "W", "I"] 133 | ignore=[ 134 | # space before : (needed for how black formats slicing) 135 | "E203", 136 | # do not assign a lambda expression, use a def 137 | "E731", 138 | # do not use variables named 'l', 'O', or 'I' 139 | "E741", 140 | ] 141 | 142 | [tool.ruff.lint.per-file-ignores] 143 | # It's fine not to put the import at the top of the file in the examples 144 | # folder. 145 | "examples/*"=["E402"] 146 | "doc/conf.py"=["E402"] 147 | "doc/_templates/numpydoc_docstring.py"=["F821", "W292"] 148 | 149 | [tool.pytest.ini_options] 150 | addopts = ["--import-mode=importlib",] 151 | doctest_optionflags = "NORMALIZE_WHITESPACE" 152 | -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Base JavaScript utilities for all Sphinx HTML documentation. 3 | */ 4 | "use strict"; 5 | 6 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 7 | "TEXTAREA", 8 | "INPUT", 9 | "SELECT", 10 | "BUTTON", 11 | ]); 12 | 13 | const _ready = (callback) => { 14 | if (document.readyState !== "loading") { 15 | callback(); 16 | } else { 17 | document.addEventListener("DOMContentLoaded", callback); 18 | } 19 | }; 20 | 21 | /** 22 | * Small JavaScript module for the documentation. 23 | */ 24 | const Documentation = { 25 | init: () => { 26 | Documentation.initDomainIndexTable(); 27 | Documentation.initOnKeyListeners(); 28 | }, 29 | 30 | /** 31 | * i18n support 32 | */ 33 | TRANSLATIONS: {}, 34 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 35 | LOCALE: "unknown", 36 | 37 | // gettext and ngettext don't access this so that the functions 38 | // can safely bound to a different name (_ = Documentation.gettext) 39 | gettext: (string) => { 40 | const translated = Documentation.TRANSLATIONS[string]; 41 | switch (typeof translated) { 42 | case "undefined": 43 | return string; // no translation 44 | case "string": 45 | return translated; // translation exists 46 | default: 47 | return translated[0]; // (singular, plural) translation tuple exists 48 | } 49 | }, 50 | 51 | ngettext: (singular, plural, n) => { 52 | const translated = Documentation.TRANSLATIONS[singular]; 53 | if (typeof translated !== "undefined") 54 | return translated[Documentation.PLURAL_EXPR(n)]; 55 | return n === 1 ? singular : plural; 56 | }, 57 | 58 | addTranslations: (catalog) => { 59 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 60 | Documentation.PLURAL_EXPR = new Function( 61 | "n", 62 | `return (${catalog.plural_expr})` 63 | ); 64 | Documentation.LOCALE = catalog.locale; 65 | }, 66 | 67 | /** 68 | * helper function to focus on search bar 69 | */ 70 | focusSearchBar: () => { 71 | document.querySelectorAll("input[name=q]")[0]?.focus(); 72 | }, 73 | 74 | /** 75 | * Initialise the domain index toggle buttons 76 | */ 77 | initDomainIndexTable: () => { 78 | const toggler = (el) => { 79 | const idNumber = el.id.substr(7); 80 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 81 | if (el.src.substr(-9) === "minus.png") { 82 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 83 | toggledRows.forEach((el) => (el.style.display = "none")); 84 | } else { 85 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 86 | toggledRows.forEach((el) => (el.style.display = "")); 87 | } 88 | }; 89 | 90 | const togglerElements = document.querySelectorAll("img.toggler"); 91 | togglerElements.forEach((el) => 92 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 93 | ); 94 | togglerElements.forEach((el) => (el.style.display = "")); 95 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 96 | }, 97 | 98 | initOnKeyListeners: () => { 99 | // only install a listener if it is really needed 100 | if ( 101 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 102 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 103 | ) 104 | return; 105 | 106 | document.addEventListener("keydown", (event) => { 107 | // bail for input elements 108 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 109 | // bail with special keys 110 | if (event.altKey || event.ctrlKey || event.metaKey) return; 111 | 112 | if (!event.shiftKey) { 113 | switch (event.key) { 114 | case "ArrowLeft": 115 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 116 | 117 | const prevLink = document.querySelector('link[rel="prev"]'); 118 | if (prevLink && prevLink.href) { 119 | window.location.href = prevLink.href; 120 | event.preventDefault(); 121 | } 122 | break; 123 | case "ArrowRight": 124 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 125 | 126 | const nextLink = document.querySelector('link[rel="next"]'); 127 | if (nextLink && nextLink.href) { 128 | window.location.href = nextLink.href; 129 | event.preventDefault(); 130 | } 131 | break; 132 | } 133 | } 134 | 135 | // some keyboard layouts may need Shift to get / 136 | switch (event.key) { 137 | case "/": 138 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 139 | Documentation.focusSearchBar(); 140 | event.preventDefault(); 141 | } 142 | }); 143 | }, 144 | }; 145 | 146 | // quick alias for translations 147 | const _ = Documentation.gettext; 148 | 149 | _ready(Documentation.init); 150 | -------------------------------------------------------------------------------- /experiments/experiment_classification_2_mapie.py: -------------------------------------------------------------------------------- 1 | """Benchmarking run time of MapieClassifier + RandomForestClassifier""" 2 | 3 | from mapie.classification import MapieClassifier 4 | 5 | from sklearn.ensemble import RandomForestClassifier 6 | from sklearn.model_selection import train_test_split 7 | import pandas as pd 8 | import numpy as np 9 | import csv 10 | import os 11 | from scipy.stats import mode 12 | import time 13 | from ucimlrepo import fetch_ucirepo 14 | from sklearn.preprocessing import StandardScaler 15 | 16 | import tensorflow as tf 17 | 18 | result_folder = "results_classification_time" 19 | 20 | if not os.path.exists(result_folder): 21 | os.makedirs(result_folder) 22 | 23 | 24 | rng = np.random.default_rng(1) 25 | randints = rng.integers(0, high=1e6, size=30) 26 | alpha = 0.05 27 | 28 | 29 | ################################ 30 | # Training & Evaluation workflow 31 | ################################ 32 | 33 | 34 | def experiment(data_name, X_train, y_train, X_test, y_test, method_list, params): 35 | for method, method_name, k_, lambda_ in method_list: 36 | echo = [] 37 | train_times = [] 38 | test_times = [] 39 | for k in range(30): 40 | rf = RandomForestClassifier(n_estimators=params[method]["n_estimators"]) 41 | rfcv = MapieClassifier( 42 | estimator=rf, 43 | method="aps", 44 | cv=method, 45 | test_size=0.3, 46 | random_state=randints[k], 47 | n_jobs=-1, 48 | ) 49 | curr1 = time.time() 50 | rfcv.fit(X_train, y_train) 51 | curr2 = time.time() 52 | curr3 = time.time() 53 | _, y_pred = rfcv.predict( 54 | X_test, 55 | alpha=alpha, 56 | include_last_label="randomized", 57 | agg_scores="crossval", 58 | ) 59 | curr4 = time.time() 60 | train_times.append(curr2 - curr1) 61 | test_times.append(curr4 - curr3) 62 | print("time", curr2 - curr1, curr4 - curr3) 63 | echo.append(k + 1) 64 | print("echo", k, ", alpha =", alpha) 65 | 66 | filename = f"{data_name}_{method_name}_MAPIE.csv" 67 | with open(filename, "w", newline="") as f: 68 | write = csv.writer(os.path.join(result_folder, f)) 69 | write.writerows([echo, echo, echo, train_times, test_times]) 70 | 71 | 72 | # Set up methods and parameters. 73 | method_list = [(10, "cv", 0, 0), ("split", "split", 0, 0)] 74 | 75 | param_dict = {10: {"n_estimators": 100}, "split": {"n_estimators": int(1000 * 0.9)}} 76 | 77 | 78 | ############## 79 | # Mice dataset 80 | ############## 81 | 82 | MiceData = pd.read_csv("data/MiceClean.csv") 83 | 84 | X = MiceData.drop(columns=["class", "MouseID"]) 85 | y = MiceData["class"] 86 | y = y.values.reshape(-1, 1) 87 | y = y[:, 0] 88 | 89 | seed = 1 90 | X_train, X_test, y_train, y_test = train_test_split( 91 | X, y, test_size=0.20, stratify=y, random_state=seed 92 | ) 93 | 94 | experiment("MiceData", X_train, y_train, X_test, y_test, method_list, param_dict) 95 | 96 | 97 | ##################### 98 | # WineQuality dataset 99 | ##################### 100 | wine_quality = pd.read_csv("data/winequality-white.csv", sep=";") 101 | 102 | seed = 123 103 | 104 | sample_wine = wine_quality 105 | 106 | X = sample_wine.drop(columns=["quality"]) 107 | y = sample_wine["quality"] 108 | y = y.to_numpy() 109 | 110 | X_train, X_test, y_train, y_test = train_test_split( 111 | X, y, test_size=0.20, stratify=y, random_state=seed 112 | ) 113 | 114 | # Normalize data to prevent numerical overflows. 115 | scaler = StandardScaler() 116 | X_train = scaler.fit_transform(X_train) 117 | X_test = scaler.transform(X_test) 118 | 119 | experiment("WineData", X_train, y_train, X_test, y_test, method_list, param_dict) 120 | 121 | 122 | #################### 123 | # Myocardial dataset 124 | #################### 125 | 126 | myocardial = fetch_ucirepo(id=579) 127 | 128 | X = myocardial.data.features 129 | y = myocardial.data.targets 130 | 131 | y = y["LET_IS"] 132 | y = y.to_numpy() 133 | 134 | seed = 1 135 | 136 | X_train, X_test, y_train, y_test = train_test_split( 137 | X, y, test_size=0.20, stratify=y, random_state=seed 138 | ) 139 | 140 | experiment("MyocData", X_train, y_train, X_test, y_test, method_list, param_dict) 141 | 142 | 143 | ############### 144 | # MNIST dataset 145 | ############### 146 | 147 | (X_train, y_train), (X_test, y_test) = tf.keras.datasets.mnist.load_data() 148 | 149 | X_train = X_train.reshape((X_train.shape[0], -1)) 150 | X_test = X_test.reshape((X_test.shape[0], -1)) 151 | 152 | X_train = X_train.astype("float32") 153 | X_test = X_test.astype("float32") 154 | 155 | X_train = X_train / 255 156 | X_test = X_test / 255 157 | 158 | X_train = X_train[0:5000] 159 | y_train = y_train[0:5000] 160 | 161 | X_test = X_test[0:1250] 162 | y_test = y_test[0:1250] 163 | 164 | experiment("MNISTData", X_train, y_train, X_test, y_test, method_list, param_dict) 165 | -------------------------------------------------------------------------------- /experiments/experiment_regression_2_ours.py: -------------------------------------------------------------------------------- 1 | """Benchmarking run time of CoverForestRegressor""" 2 | 3 | from coverforest import CoverForestRegressor 4 | from sklearn.model_selection import train_test_split 5 | import pandas as pd 6 | import numpy as np 7 | import csv 8 | import os 9 | import time 10 | from sklearn.datasets import fetch_california_housing 11 | 12 | from urllib.request import urlretrieve 13 | import zipfile 14 | 15 | 16 | result_folder = "results_regression_time" 17 | 18 | if not os.path.exists(result_folder): 19 | os.makedirs(result_folder) 20 | 21 | rng = np.random.default_rng(2) 22 | randints = rng.integers(0, high=1e6, size=30) 23 | alpha = 0.05 24 | 25 | 26 | ################################ 27 | # Training & Evaluation workflow 28 | ################################ 29 | 30 | 31 | def experiment(data_name, X_train, y_train, X_test, y_test, method_list, params): 32 | for method, k_, lambda_ in method_list: 33 | n_preds = [] 34 | coverage_probs = [] 35 | echo = [] 36 | train_times = [] 37 | test_times = [] 38 | for k in range(30): 39 | rfreg = CoverForestRegressor( 40 | n_estimators=params[method]["n_estimators"], 41 | method=method, 42 | cv=10, 43 | n_jobs=-1, 44 | random_state=randints[k], 45 | ) 46 | curr1 = time.time() 47 | rfreg.fit(X_train, y_train, alpha=alpha) 48 | curr2 = time.time() 49 | curr3 = time.time() 50 | y_pred, intervals = rfreg.predict(X_test, alpha=alpha) 51 | curr4 = time.time() 52 | train_times.append(curr2 - curr1) 53 | test_times.append(curr4 - curr3) 54 | print("Training + prediction time:", curr2 - curr1, curr4 - curr3) 55 | avg_size = np.mean(intervals[:, 1] - intervals[:, 0]) 56 | cvg_prob = np.mean( 57 | (intervals[:, 0] <= y_test) & (y_test <= intervals[:, 1]) 58 | ) 59 | n_preds.append(avg_size) 60 | coverage_probs.append(cvg_prob) 61 | echo.append(k + 1) 62 | print("echo", k, ", alpha =", alpha) 63 | print(f"average size = {avg_size}, coverage = {cvg_prob}.") 64 | 65 | method_ = method.replace("_", "") 66 | filename = f"{data_name}_{method_}_Ours.csv" 67 | with open(filename, "w", newline="") as f: 68 | write = csv.writer(os.path.join(result_folder, f)) 69 | write.writerows([echo, n_preds, coverage_probs, train_times, test_times]) 70 | 71 | 72 | # Set up methods and parameters. 73 | method_list = [("bootstrap", 0, 0), ("cv", 0, 0), ("split", 0, 0)] 74 | 75 | param_dict = { 76 | "bootstrap": {"n_estimators": int(1000 * 0.9)}, 77 | "cv": {"n_estimators": 100}, 78 | "split": {"n_estimators": int(1000 * 0.9)}, 79 | } 80 | 81 | 82 | ################# 83 | # Housing dataset 84 | ################# 85 | 86 | housing = fetch_california_housing() 87 | X = pd.DataFrame(housing.data, columns=housing.feature_names) 88 | y = housing.target 89 | X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1) 90 | 91 | experiment("HousingData", X_train, y_train, X_test, y_test, method_list, param_dict) 92 | 93 | 94 | ################## 95 | # Concrete dataset 96 | ################## 97 | 98 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/concrete/compressive/Concrete_Data.xls" 99 | data = pd.read_excel(url) 100 | X = data.iloc[:, :-1] 101 | y = data.iloc[:, -1] 102 | X_train, X_test, y_train, y_test = train_test_split( 103 | X, y, test_size=0.2, random_state=42 104 | ) 105 | 106 | experiment("ConcreteData", X_train, y_train, X_test, y_test, method_list, param_dict) 107 | 108 | 109 | ############## 110 | # Bike dataset 111 | ############## 112 | 113 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/00275/Bike-Sharing-Dataset.zip" 114 | 115 | urlretrieve(url, "bike_sharing.zip") 116 | with zipfile.ZipFile("bike_sharing.zip", "r") as zip_ref: 117 | zip_ref.extractall("bike_data") 118 | 119 | data = pd.read_csv("bike_data/hour.csv") 120 | 121 | X = data.drop(["instant", "dteday", "casual", "registered", "cnt"], axis=1) 122 | y = data["cnt"] # total count as target 123 | 124 | X_train, X_test, y_train, y_test = train_test_split( 125 | X, y, test_size=0.2, random_state=42 126 | ) 127 | 128 | experiment("BikeData", X_train, y_train, X_test, y_test, method_list, param_dict) 129 | 130 | 131 | ############### 132 | # Crime dataset 133 | ############### 134 | 135 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/communities/communities.data" 136 | 137 | data = pd.read_csv("communities.data", header=None, na_values=["?"]) 138 | 139 | X = data.iloc[:, 5:-1] 140 | y = data.iloc[:, -1] # violent crimes per population 141 | 142 | X_train, X_test, y_train, y_test = train_test_split( 143 | X, y, test_size=0.2, random_state=42 144 | ) 145 | 146 | experiment("CrimeData", X_train, y_train, X_test, y_test, method_list, param_dict) 147 | -------------------------------------------------------------------------------- /experiments/experiment_regression_2_mapie.py: -------------------------------------------------------------------------------- 1 | """Benchmarking run time of MapieRegressor + RandomForestRegressor""" 2 | 3 | from mapie.regression import MapieRegressor 4 | from mapie.subsample import Subsample 5 | from sklearn.tree import DecisionTreeRegressor 6 | from sklearn.ensemble import RandomForestRegressor 7 | from sklearn.model_selection import train_test_split 8 | import pandas as pd 9 | import numpy as np 10 | import csv 11 | import os 12 | import time 13 | from sklearn.datasets import fetch_california_housing 14 | 15 | from urllib.request import urlretrieve 16 | import zipfile 17 | 18 | result_folder = "results_regression_time" 19 | 20 | if not os.path.exists(result_folder): 21 | os.makedirs(result_folder) 22 | 23 | rng = np.random.default_rng(2) 24 | randints = rng.integers(0, high=1e6, size=50) 25 | alpha = 0.05 26 | 27 | 28 | ################################ 29 | # Training & Evaluation workflow 30 | ################################ 31 | 32 | 33 | def experiment(data_name, X_train, y_train, X_test, y_test, method_list, params): 34 | for method_name, method, cv in method_list: 35 | echo = [] 36 | train_times = [] 37 | test_times = [] 38 | 39 | for k in range(30): 40 | if name == "bootstrap": 41 | estimator = DecisionTreeRegressor(max_features="sqrt") 42 | else: 43 | estimator = RandomForestRegressor( 44 | n_estimators=params[name]["n_estimators"] 45 | ) 46 | rfreg = MapieRegressor( 47 | estimator=estimator, 48 | method=method, 49 | cv=cv, 50 | test_size=0.3, 51 | random_state=randints[k], 52 | n_jobs=-1, 53 | ) 54 | curr1 = time.time() 55 | rfreg.fit(X_train, y_train) 56 | curr2 = time.time() 57 | curr3 = time.time() 58 | _, intervals = rfreg.predict(X_test, alpha=alpha, ensemble=True) 59 | curr4 = time.time() 60 | intervals = np.squeeze(intervals) 61 | train_times.append(curr2 - curr1) 62 | test_times.append(curr4 - curr3) 63 | print("time", curr2 - curr1, curr4 - curr3) 64 | echo.append(k + 1) 65 | print("echo", k, ", alpha =", alpha) 66 | 67 | filename = f"{data_name}_{method_name}_MAPIE.csv" 68 | with open(filename, "w", newline="") as f: 69 | write = csv.writer(os.path.join(result_folder, f)) 70 | write.writerows([echo, echo, echo, train_times, test_times]) 71 | 72 | 73 | # Set up methods and parameters. 74 | method_list = [ 75 | ("bootstrap", "plus", Subsample(n_resamplings=int(1000 * 0.9))), 76 | ("cv", "plus", 10), 77 | ("split", "base", "split"), 78 | ] 79 | 80 | param_dict = {"cv": {"n_estimators": 100}, "split": {"n_estimators": int(1000 * 0.9)}} 81 | 82 | 83 | ################# 84 | # Housing dataset 85 | ################# 86 | 87 | housing = fetch_california_housing() 88 | X = pd.DataFrame(housing.data, columns=housing.feature_names) 89 | y = housing.target 90 | X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1) 91 | 92 | experiment("HousingData", X_train, y_train, X_test, y_test, method_list, param_dict) 93 | 94 | 95 | ################## 96 | # Concrete dataset 97 | ################## 98 | 99 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/concrete/compressive/Concrete_Data.xls" 100 | data = pd.read_excel(url) 101 | X = data.iloc[:, :-1] 102 | y = data.iloc[:, -1] 103 | X_train, X_test, y_train, y_test = train_test_split( 104 | X, y, test_size=0.2, random_state=42 105 | ) 106 | 107 | experiment("ConcreteData", X_train, y_train, X_test, y_test, method_list, param_dict) 108 | 109 | 110 | ############## 111 | # Bike dataset 112 | ############## 113 | 114 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/00275/Bike-Sharing-Dataset.zip" 115 | 116 | urlretrieve(url, "bike_sharing.zip") 117 | with zipfile.ZipFile("bike_sharing.zip", "r") as zip_ref: 118 | zip_ref.extractall("bike_data") 119 | 120 | data = pd.read_csv("bike_data/hour.csv") 121 | 122 | X = data.drop(["instant", "dteday", "casual", "registered", "cnt"], axis=1) 123 | y = data["cnt"] # total count as target 124 | 125 | X_train, X_test, y_train, y_test = train_test_split( 126 | X, y, test_size=0.2, random_state=42 127 | ) 128 | 129 | experiment("BikeData", X_train, y_train, X_test, y_test, method_list, param_dict) 130 | 131 | 132 | ############### 133 | # Crime dataset 134 | ############### 135 | 136 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/communities/communities.data" 137 | 138 | data = pd.read_csv("communities.data", header=None, na_values=["?"]) 139 | 140 | X = data.iloc[:, 5:-1] 141 | y = data.iloc[:, -1] # violent crimes per population 142 | 143 | X_train, X_test, y_train, y_test = train_test_split( 144 | X, y, test_size=0.2, random_state=42 145 | ) 146 | 147 | experiment("CrimeData", X_train, y_train, X_test, y_test, method_list, param_dict) 148 | -------------------------------------------------------------------------------- /experiments/experiment_regression_1.py: -------------------------------------------------------------------------------- 1 | """Benchmarking CoverForestRegressor's coverage and average interval length""" 2 | 3 | from coverforest import CoverForestRegressor 4 | from sklearn.model_selection import train_test_split 5 | import pandas as pd 6 | import numpy as np 7 | import csv 8 | import os 9 | import time 10 | from sklearn.datasets import fetch_california_housing 11 | 12 | from urllib.request import urlretrieve 13 | import zipfile 14 | 15 | result_folder = "results_regression" 16 | 17 | if not os.path.exists(result_folder): 18 | os.makedirs(result_folder) 19 | 20 | rng = np.random.default_rng(2) 21 | randints = rng.integers(0, high=1e6, size=50) 22 | 23 | 24 | ################################ 25 | # Training & Evaluation workflow 26 | ################################ 27 | 28 | 29 | def experiment(data_name, X_train, y_train, X_test, y_test, method_list, params): 30 | for method, k_, lambda_ in method_list: 31 | for alpha in [0.2, 0.1, 0.05]: 32 | n_preds = [] 33 | coverage_probs = [] 34 | echo = [] 35 | train_times = [] 36 | test_times = [] 37 | for k in range(50): 38 | rfreg = CoverForestRegressor( 39 | n_estimators=params[method]["n_estimators"], 40 | method=method, 41 | cv=10, 42 | n_jobs=-1, 43 | random_state=randints[k], 44 | ) 45 | curr1 = time.time() 46 | rfreg.fit(X_train, y_train, alpha=alpha) 47 | curr2 = time.time() 48 | curr3 = time.time() 49 | y_pred, intervals = rfreg.predict(X_test, alpha=alpha) 50 | curr4 = time.time() 51 | train_times.append(curr2 - curr1) 52 | test_times.append(curr4 - curr3) 53 | print("Training + prediction time:", curr2 - curr1, curr4 - curr3) 54 | avg_size = np.mean(intervals[:, 1] - intervals[:, 0]) 55 | cvg_prob = np.mean( 56 | (intervals[:, 0] <= y_test) & (y_test <= intervals[:, 1]) 57 | ) 58 | n_preds.append(avg_size) 59 | coverage_probs.append(cvg_prob) 60 | echo.append(k + 1) 61 | print("echo", k, ", alpha =", alpha) 62 | print(f"average size = {avg_size}, coverage = {cvg_prob}.") 63 | 64 | method_ = method.replace("_", "") 65 | filename = f"{data_name}_{method_}_{k_}_{alpha}.csv" 66 | with open(filename, "w", newline="") as f: 67 | write = csv.writer(os.path.join(result_folder, f)) 68 | write.writerows( 69 | [echo, n_preds, coverage_probs, train_times, test_times] 70 | ) 71 | 72 | 73 | # Set up methods and parameters. 74 | method_list = [("bootstrap", 0, 0), ("cv", 0, 0), ("split", 0, 0)] 75 | 76 | param_dict = { 77 | "bootstrap": {"n_estimators": int(1000 * 0.9)}, 78 | "cv": {"n_estimators": 100}, 79 | "split": {"n_estimators": int(1000 * 0.9)}, 80 | } 81 | 82 | 83 | ################# 84 | # Housing dataset 85 | ################# 86 | 87 | housing = fetch_california_housing() 88 | X = pd.DataFrame(housing.data, columns=housing.feature_names)[:5000] 89 | y = housing.target[:5000] 90 | X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=1) 91 | 92 | experiment("HousingData", X_train, y_train, X_test, y_test, method_list, param_dict) 93 | 94 | 95 | ################## 96 | # Concrete dataset 97 | ################## 98 | 99 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/concrete/compressive/Concrete_Data.xls" 100 | data = pd.read_excel(url) 101 | X = data.iloc[:, :-1] 102 | y = data.iloc[:, -1] 103 | X_train, X_test, y_train, y_test = train_test_split( 104 | X, y, test_size=0.2, random_state=42 105 | ) 106 | 107 | experiment("ConcreteData", X_train, y_train, X_test, y_test, method_list, param_dict) 108 | 109 | 110 | ############## 111 | # Bike dataset 112 | ############## 113 | 114 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/00275/Bike-Sharing-Dataset.zip" 115 | 116 | urlretrieve(url, "bike_sharing.zip") 117 | with zipfile.ZipFile("bike_sharing.zip", "r") as zip_ref: 118 | zip_ref.extractall("bike_data") 119 | 120 | data = pd.read_csv("bike_data/hour.csv").iloc[:5000] 121 | 122 | X = data.drop(["instant", "dteday", "casual", "registered", "cnt"], axis=1) 123 | y = data["cnt"] # total count as target 124 | 125 | X_train, X_test, y_train, y_test = train_test_split( 126 | X, y, test_size=0.2, random_state=42 127 | ) 128 | 129 | experiment("BikeData", X_train, y_train, X_test, y_test, method_list, param_dict) 130 | 131 | 132 | ############### 133 | # Crime dataset 134 | ############### 135 | 136 | url = "https://archive.ics.uci.edu/ml/machine-learning-databases/communities/communities.data" 137 | 138 | data = pd.read_csv("communities.data", header=None, na_values=["?"]) 139 | 140 | X = data.iloc[:, 5:-1] 141 | y = data.iloc[:, -1] # violent crimes per population 142 | 143 | X_train, X_test, y_train, y_test = train_test_split( 144 | X, y, test_size=0.2, random_state=42 145 | ) 146 | 147 | experiment("CrimeData", X_train, y_train, X_test, y_test, method_list, param_dict) 148 | -------------------------------------------------------------------------------- /experiments/experiment_classification_2_ours.py: -------------------------------------------------------------------------------- 1 | """Benchmarking run time of CoverForestClassifier""" 2 | 3 | from coverforest import CoverForestClassifier 4 | 5 | from sklearn.model_selection import train_test_split 6 | import pandas as pd 7 | import numpy as np 8 | import csv 9 | import os 10 | from scipy.stats import mode 11 | import time 12 | from ucimlrepo import fetch_ucirepo 13 | from sklearn.preprocessing import StandardScaler 14 | 15 | import tensorflow as tf 16 | 17 | result_folder = "results_classification_time" 18 | 19 | if not os.path.exists(result_folder): 20 | os.makedirs(result_folder) 21 | 22 | rng = np.random.default_rng(2) 23 | randints = rng.integers(0, high=1e6, size=30) 24 | alpha = 0.5 25 | 26 | 27 | ################################ 28 | # Training & Evaluation workflow 29 | ################################ 30 | 31 | 32 | def experiment(data_name, X_train, y_train, X_test, y_test, method_list, params): 33 | for method, k_, lambda_ in method_list: 34 | n_preds = [] 35 | coverage_probs = [] 36 | echo = [] 37 | train_times = [] 38 | test_times = [] 39 | for k in range(30): 40 | rfclf = CoverForestClassifier( 41 | n_estimators=params[method]["n_estimators"], 42 | method=method, 43 | allow_empty_sets=True, 44 | cv=10, 45 | k_init=k_, 46 | lambda_init=lambda_, 47 | n_jobs=-1, 48 | random_state=randints[k], 49 | ) 50 | curr1 = time.time() 51 | rfclf.fit(X_train, y_train, alpha=alpha) 52 | curr2 = time.time() 53 | curr3 = time.time() 54 | _, y_pred = rfclf.predict(X_test, alpha=alpha, binary_output=False) 55 | curr4 = time.time() 56 | train_times.append(curr2 - curr1) 57 | test_times.append(curr4 - curr3) 58 | print("Training time:", curr2 - curr1, curr4 - curr3) 59 | avg_size = np.mean([y_pred[i].shape[0] for i in range(len(y_pred))]) 60 | cvg_prob = np.mean([y_test[i] in y_pred[i] for i in range(len(y_pred))]) 61 | n_preds.append(avg_size) 62 | coverage_probs.append(cvg_prob) 63 | echo.append(k + 1) 64 | print("echo", k, ", alpha =", alpha) 65 | print(f"average size = {avg_size}, coverage = {cvg_prob}.") 66 | 67 | method_ = method.replace("_", "") 68 | filename = f"{data_name}_{method_}_Ours.csv" 69 | with open(filename, "w", newline="") as f: 70 | write = csv.writer(os.path.join(result_folder, f)) 71 | write.writerows([echo, n_preds, coverage_probs, train_times, test_times]) 72 | 73 | 74 | # Set up methods and parameters. 75 | method_list = [("bootstrap", 0, 0), ("cv", 0, 0), ("split", 0, 0)] 76 | 77 | param_dict = { 78 | "bootstrap": {"n_estimators": int(1000 * 0.9)}, 79 | "cv": {"n_estimators": 100}, 80 | "split": {"n_estimators": int(1000 * 0.9)}, 81 | } 82 | 83 | 84 | ############## 85 | # Mice dataset 86 | ############## 87 | 88 | MiceData = pd.read_csv("data/MiceClean.csv") 89 | 90 | X = MiceData.drop(columns=["class", "MouseID"]) 91 | y = MiceData["class"] 92 | y = y.values.reshape(-1, 1) 93 | y = y[:, 0] 94 | 95 | seed = 1 96 | X_train, X_test, y_train, y_test = train_test_split( 97 | X, y, test_size=0.20, stratify=y, random_state=seed 98 | ) 99 | 100 | experiment("MiceData", X_train, y_train, X_test, y_test, method_list, param_dict) 101 | 102 | 103 | ##################### 104 | # WineQuality dataset 105 | ##################### 106 | wine_quality = pd.read_csv("data/winequality-white.csv", sep=";") 107 | 108 | seed = 123 109 | 110 | sample_wine = wine_quality 111 | 112 | X = sample_wine.drop(columns=["quality"]) 113 | y = sample_wine["quality"] 114 | y = y.to_numpy() 115 | 116 | X_train, X_test, y_train, y_test = train_test_split( 117 | X, y, test_size=0.20, stratify=y, random_state=seed 118 | ) 119 | 120 | # Normalize data to prevent numerical overflows. 121 | scaler = StandardScaler() 122 | X_train = scaler.fit_transform(X_train) 123 | X_test = scaler.transform(X_test) 124 | 125 | experiment("WineData", X_train, y_train, X_test, y_test, method_list, param_dict) 126 | 127 | 128 | #################### 129 | # Myocardial dataset 130 | #################### 131 | 132 | myocardial = fetch_ucirepo(id=579) 133 | 134 | X = myocardial.data.features 135 | y = myocardial.data.targets 136 | 137 | y = y["LET_IS"] 138 | y = y.to_numpy() 139 | 140 | seed = 1 141 | 142 | X_train, X_test, y_train, y_test = train_test_split( 143 | X, y, test_size=0.20, stratify=y, random_state=seed 144 | ) 145 | 146 | experiment("MyocData", X_train, y_train, X_test, y_test, method_list, param_dict) 147 | 148 | 149 | ############### 150 | # MNIST dataset 151 | ############### 152 | 153 | (X_train, y_train), (X_test, y_test) = tf.keras.datasets.mnist.load_data() 154 | 155 | X_train = X_train.reshape((X_train.shape[0], -1)) 156 | X_test = X_test.reshape((X_test.shape[0], -1)) 157 | 158 | X_train = X_train.astype("float32") 159 | X_test = X_test.astype("float32") 160 | 161 | X_train = X_train / 255 162 | X_test = X_test / 255 163 | 164 | X_train = X_train[0:5000] 165 | y_train = y_train[0:5000] 166 | 167 | X_test = X_test[0:1250] 168 | y_test = y_test[0:1250] 169 | 170 | experiment("MNISTData", X_train, y_train, X_test, y_test, method_list, param_dict) 171 | -------------------------------------------------------------------------------- /docs/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This script contains the language-specific data used by searchtools.js, 3 | * namely the list of stopwords, stemmer, scorer and splitter. 4 | */ 5 | 6 | var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; 7 | 8 | 9 | /* Non-minified version is copied as a separate JS file, if available */ 10 | 11 | /** 12 | * Porter Stemmer 13 | */ 14 | var Stemmer = function() { 15 | 16 | var step2list = { 17 | ational: 'ate', 18 | tional: 'tion', 19 | enci: 'ence', 20 | anci: 'ance', 21 | izer: 'ize', 22 | bli: 'ble', 23 | alli: 'al', 24 | entli: 'ent', 25 | eli: 'e', 26 | ousli: 'ous', 27 | ization: 'ize', 28 | ation: 'ate', 29 | ator: 'ate', 30 | alism: 'al', 31 | iveness: 'ive', 32 | fulness: 'ful', 33 | ousness: 'ous', 34 | aliti: 'al', 35 | iviti: 'ive', 36 | biliti: 'ble', 37 | logi: 'log' 38 | }; 39 | 40 | var step3list = { 41 | icate: 'ic', 42 | ative: '', 43 | alize: 'al', 44 | iciti: 'ic', 45 | ical: 'ic', 46 | ful: '', 47 | ness: '' 48 | }; 49 | 50 | var c = "[^aeiou]"; // consonant 51 | var v = "[aeiouy]"; // vowel 52 | var C = c + "[^aeiouy]*"; // consonant sequence 53 | var V = v + "[aeiou]*"; // vowel sequence 54 | 55 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 56 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 57 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 58 | var s_v = "^(" + C + ")?" + v; // vowel in stem 59 | 60 | this.stemWord = function (w) { 61 | var stem; 62 | var suffix; 63 | var firstch; 64 | var origword = w; 65 | 66 | if (w.length < 3) 67 | return w; 68 | 69 | var re; 70 | var re2; 71 | var re3; 72 | var re4; 73 | 74 | firstch = w.substr(0,1); 75 | if (firstch == "y") 76 | w = firstch.toUpperCase() + w.substr(1); 77 | 78 | // Step 1a 79 | re = /^(.+?)(ss|i)es$/; 80 | re2 = /^(.+?)([^s])s$/; 81 | 82 | if (re.test(w)) 83 | w = w.replace(re,"$1$2"); 84 | else if (re2.test(w)) 85 | w = w.replace(re2,"$1$2"); 86 | 87 | // Step 1b 88 | re = /^(.+?)eed$/; 89 | re2 = /^(.+?)(ed|ing)$/; 90 | if (re.test(w)) { 91 | var fp = re.exec(w); 92 | re = new RegExp(mgr0); 93 | if (re.test(fp[1])) { 94 | re = /.$/; 95 | w = w.replace(re,""); 96 | } 97 | } 98 | else if (re2.test(w)) { 99 | var fp = re2.exec(w); 100 | stem = fp[1]; 101 | re2 = new RegExp(s_v); 102 | if (re2.test(stem)) { 103 | w = stem; 104 | re2 = /(at|bl|iz)$/; 105 | re3 = new RegExp("([^aeiouylsz])\\1$"); 106 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 107 | if (re2.test(w)) 108 | w = w + "e"; 109 | else if (re3.test(w)) { 110 | re = /.$/; 111 | w = w.replace(re,""); 112 | } 113 | else if (re4.test(w)) 114 | w = w + "e"; 115 | } 116 | } 117 | 118 | // Step 1c 119 | re = /^(.+?)y$/; 120 | if (re.test(w)) { 121 | var fp = re.exec(w); 122 | stem = fp[1]; 123 | re = new RegExp(s_v); 124 | if (re.test(stem)) 125 | w = stem + "i"; 126 | } 127 | 128 | // Step 2 129 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 130 | if (re.test(w)) { 131 | var fp = re.exec(w); 132 | stem = fp[1]; 133 | suffix = fp[2]; 134 | re = new RegExp(mgr0); 135 | if (re.test(stem)) 136 | w = stem + step2list[suffix]; 137 | } 138 | 139 | // Step 3 140 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 141 | if (re.test(w)) { 142 | var fp = re.exec(w); 143 | stem = fp[1]; 144 | suffix = fp[2]; 145 | re = new RegExp(mgr0); 146 | if (re.test(stem)) 147 | w = stem + step3list[suffix]; 148 | } 149 | 150 | // Step 4 151 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 152 | re2 = /^(.+?)(s|t)(ion)$/; 153 | if (re.test(w)) { 154 | var fp = re.exec(w); 155 | stem = fp[1]; 156 | re = new RegExp(mgr1); 157 | if (re.test(stem)) 158 | w = stem; 159 | } 160 | else if (re2.test(w)) { 161 | var fp = re2.exec(w); 162 | stem = fp[1] + fp[2]; 163 | re2 = new RegExp(mgr1); 164 | if (re2.test(stem)) 165 | w = stem; 166 | } 167 | 168 | // Step 5 169 | re = /^(.+?)e$/; 170 | if (re.test(w)) { 171 | var fp = re.exec(w); 172 | stem = fp[1]; 173 | re = new RegExp(mgr1); 174 | re2 = new RegExp(meq1); 175 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 176 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 177 | w = stem; 178 | } 179 | re = /ll$/; 180 | re2 = new RegExp(mgr1); 181 | if (re.test(w) && re2.test(w)) { 182 | re = /.$/; 183 | w = w.replace(re,""); 184 | } 185 | 186 | // and turn initial Y back to y 187 | if (firstch == "y") 188 | w = firstch.toLowerCase() + w.substr(1); 189 | return w; 190 | } 191 | } 192 | -------------------------------------------------------------------------------- /docs/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | const rest = document.createTextNode(val.substr(pos + text.length)); 33 | parent.insertBefore( 34 | span, 35 | parent.insertBefore( 36 | rest, 37 | node.nextSibling 38 | ) 39 | ); 40 | node.nodeValue = val.substr(0, pos); 41 | /* There may be more occurrences of search term in this node. So call this 42 | * function recursively on the remaining fragment. 43 | */ 44 | _highlight(rest, addItems, text, className); 45 | 46 | if (isInSVG) { 47 | const rect = document.createElementNS( 48 | "http://www.w3.org/2000/svg", 49 | "rect" 50 | ); 51 | const bbox = parent.getBBox(); 52 | rect.x.baseVal.value = bbox.x; 53 | rect.y.baseVal.value = bbox.y; 54 | rect.width.baseVal.value = bbox.width; 55 | rect.height.baseVal.value = bbox.height; 56 | rect.setAttribute("class", className); 57 | addItems.push({ parent: parent, target: rect }); 58 | } 59 | } 60 | } else if (node.matches && !node.matches("button, select, textarea")) { 61 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 62 | } 63 | }; 64 | const _highlightText = (thisNode, text, className) => { 65 | let addItems = []; 66 | _highlight(thisNode, addItems, text, className); 67 | addItems.forEach((obj) => 68 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 69 | ); 70 | }; 71 | 72 | /** 73 | * Small JavaScript module for the documentation. 74 | */ 75 | const SphinxHighlight = { 76 | 77 | /** 78 | * highlight the search words provided in localstorage in the text 79 | */ 80 | highlightSearchWords: () => { 81 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 82 | 83 | // get and clear terms from localstorage 84 | const url = new URL(window.location); 85 | const highlight = 86 | localStorage.getItem("sphinx_highlight_terms") 87 | || url.searchParams.get("highlight") 88 | || ""; 89 | localStorage.removeItem("sphinx_highlight_terms") 90 | url.searchParams.delete("highlight"); 91 | window.history.replaceState({}, "", url); 92 | 93 | // get individual terms from highlight string 94 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 95 | if (terms.length === 0) return; // nothing to do 96 | 97 | // There should never be more than one element matching "div.body" 98 | const divBody = document.querySelectorAll("div.body"); 99 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 100 | window.setTimeout(() => { 101 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 102 | }, 10); 103 | 104 | const searchBox = document.getElementById("searchbox"); 105 | if (searchBox === null) return; 106 | searchBox.appendChild( 107 | document 108 | .createRange() 109 | .createContextualFragment( 110 | '" 114 | ) 115 | ); 116 | }, 117 | 118 | /** 119 | * helper function to hide the search marks again 120 | */ 121 | hideSearchWords: () => { 122 | document 123 | .querySelectorAll("#searchbox .highlight-link") 124 | .forEach((el) => el.remove()); 125 | document 126 | .querySelectorAll("span.highlighted") 127 | .forEach((el) => el.classList.remove("highlighted")); 128 | localStorage.removeItem("sphinx_highlight_terms") 129 | }, 130 | 131 | initEscapeListener: () => { 132 | // only install a listener if it is really needed 133 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 134 | 135 | document.addEventListener("keydown", (event) => { 136 | // bail for input elements 137 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 138 | // bail with special keys 139 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 140 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 141 | SphinxHighlight.hideSearchWords(); 142 | event.preventDefault(); 143 | } 144 | }); 145 | }, 146 | }; 147 | 148 | _ready(() => { 149 | /* Do not call highlightSearchWords() when we are on the search page. 150 | * It will highlight words from the *previous* search query. 151 | */ 152 | if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); 153 | SphinxHighlight.initEscapeListener(); 154 | }); 155 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | ## 🌳 coverforest - Conformal Predictions with Random Forest 6 | 7 | A simple and fast implementation of conformal random forests for both classification and regression tasks. **coverforest** extends [scikit-learn](https://scikit-learn.org)'s random forest implementation to provide prediction sets/intervals with guaranteed coverage using conformal prediction methods. 8 | 9 | **coverforest** provides three conformal prediction methods for random forests: 10 | - CV+ (Cross-Validation+) [[1](#1), [2](#2)]. 11 | - Jackknife+-after-Bootstrap [[3]](#3). 12 | - Split Conformal [[4]](#4). 13 | 14 | The library provides two main classes: `CoverForestRegressor` for interval prediction and `CoverForestClassifier`. for set prediction. 15 | Here are quick runs of the two classes: 16 | 17 | ```python 18 | from coverforest import CoverForestRegressor 19 | 20 | reg = CoverForestRegressor(n_estimators=100, method='bootstrap') # using J+-a-Bootstrap 21 | reg.fit(X_train, y_train) 22 | y_pred, y_intervals = reg.predict(X_test, alpha=0.05) # 95% coverage intervals 23 | ``` 24 | 25 | ```python 26 | from coverforest import CoverForestClassifier 27 | 28 | clf = CoverForestClassifier(n_estimators=100, method='cv') # using CV+ 29 | clf.fit(X_train, y_train) 30 | y_pred, y_sets = clf.predict(X_test, alpha=0.05) # 95% coverage sets 31 | ``` 32 | 33 | You can try these models in Colab: [[Classification](https://colab.research.google.com/github/donlapark/coverforest/blob/main/notebooks/classification_pipeline.ipynb)] [[Regression](https://colab.research.google.com/github/donlapark/coverforest/blob/main/notebooks/regression_pipeline.ipynb)] 34 | 35 | For additional examples and package API, see [Documentation](https://donlapark.github.io/coverforest). 36 | 37 | ## 🔧 Requirements 38 | 39 | - Python >=3.9 40 | - Scikit-learn >=1.6.0 41 | 42 | ## ⚡ Installation 43 | 44 | You can install **coverforest** using pip: 45 | 46 | ```bash 47 | pip install coverforest 48 | ``` 49 | 50 | Or install from source: 51 | 52 | ```bash 53 | git clone https://github.com/donlapark/coverforest.git 54 | cd coverforest 55 | pip install . 56 | ``` 57 | 58 | ### Regularization in conformal set predictions 59 | 60 | The classifier includes two regularization parameters $k$ and $\lambda$ that encourage smaller prediction sets [[5]](#5). 61 | 62 | ```python 63 | clf = CoverForestClassifier(n_estimators=100, method='cv', k_init=2, lambda_init=0.1) 64 | ``` 65 | 66 | Automatic searching for suitable $k$ and $\lambda$ is also possible by specifying `k_init="auto"` and `lambda_init="auto"`, which are the default values of `CoverForestClassifier`. 67 | 68 | ### Performance Tips 69 | 70 | Random forest leverages parallel computation by processing trees concurrently. Use the `n_jobs` parameter in `fit()` and `predict()` to control CPU usage (`n_jobs=-1` uses all cores). 71 | 72 | For prediction, conformity score calculations require a memory array of size `(n_train × n_test × n_classes)`. To optimize performance with high `n_jobs` values, split large test sets into smaller batches. 73 | 74 | See the documentation for more details and examples. 75 | 76 | ## 🔗 See Also 77 | 78 | - [MAPIE](https://github.com/scikit-learn-contrib/MAPIE): A Python package that provides scikit-learn-compatible wrappers for conformal classification and regression 79 | - [conforest](https://github.com/knrumsey/conforest) An R implementation of random forest with inductive conformal prediction. 80 | - [clover](https://github.com/Monoxido45/clover) A Python implementation of a regression forest method for conditional coverage ($`P(Y \vert X =x)`$) guarantee. 81 | - [Conformal Prediction](https://github.com/aangelopoulos/conformal-prediction): Jupyter Notebook demonstrations of conformal prediction on various tasks, such as image classification, image segmentation, times series forecasting, and outlier detection 82 | - [TorchCP](https://github.com/ml-stat-Sustech/TorchCP) A Python toolbox for Conformal Prediction in Deep Learning built on top of PyTorch 83 | - [crepes](https://github.com/henrikbostrom/crepes) A Python package that implements standard and Mondrian conformal classifiers as well as standard, normalized and Mondrian conformal regressors and predictive systems. 84 | - [nonconformist](https://github.com/donlnz/nonconformist): One of the first Python implementations of conformal prediction 85 | 86 | 87 | ## 📖 References 88 | 89 | [1] Yaniv Romano, Matteo Sesia & Emmanuel J. Candès, "Classification with Valid and Adaptive Coverage", NeurIPS 2020. 90 | 91 | [2] Rina Foygel Barber, Emmanuel J. Candès, Aaditya Ramdas & Ryan J. Tibshirani, "Predictive inference with the jackknife+", Ann. Statist. 49 (1) 486-507, 2021. 92 | 93 | [3] Byol Kim, Chen Xu, Rina Foygel Barber, "Predictive inference is free with the jackknife+-after-bootstrap", NeurIPS 2020. 94 | 95 | [4] Vladimir Vovk, Ilia Nouretdinov, Valery Manokhin & Alexander Gammerman, "Cross-conformal predictive distributions", 37-51, COPA 2018. 96 | 97 | [5] Anastasios Nikolas Angelopoulos, Stephen Bates, Michael I. Jordan & Jitendra Malik, "Uncertainty Sets for Image Classifiers using Conformal Prediction", ICLR 2021. 98 | 99 | [6] Leo Breiman, "Random Forests", Machine Learning, 45(1), 5-32, 2001. 100 | 101 | ## 📜 License 102 | 103 | [BSD-3-Clause license](https://github.com/donlapark/coverforest/blob/main/LICENSE) 104 | 105 | ## 📝 Citation 106 | 107 | If you use **coverforest** in your research, please cite: 108 | 109 | ```bibtex 110 | @misc{coverforest2025, 111 | Author = {Panisara Meehinkong and Donlapark Ponnoprat}, 112 | Title = {coverforest: Conformal Predictions with Random Forest in Python}, 113 | Year = {2025}, 114 | Eprint = {arXiv:2501.14570}, 115 | } 116 | ``` 117 | -------------------------------------------------------------------------------- /experiments/experiment_classification_1.py: -------------------------------------------------------------------------------- 1 | """Benchmarking CoverForestClassifier's coverage and average set size""" 2 | 3 | from coverforest import CoverForestClassifier 4 | from sklearn.model_selection import train_test_split 5 | import pandas as pd 6 | import numpy as np 7 | import csv 8 | import os 9 | from scipy.stats import mode 10 | import time 11 | from ucimlrepo import fetch_ucirepo 12 | from sklearn.preprocessing import StandardScaler 13 | 14 | import tensorflow as tf 15 | 16 | result_folder = "results_classification" 17 | 18 | if not os.path.exists(result_folder): 19 | os.makedirs(result_folder) 20 | 21 | rng1 = np.random.default_rng(1) 22 | randints1 = rng1.integers(0, high=1e6, size=15) 23 | rng2 = np.random.default_rng(2) 24 | randints2 = rng2.integers(0, high=1e6, size=50) 25 | 26 | 27 | ################################ 28 | # Training & Evaluation workflow 29 | ################################ 30 | 31 | 32 | def experiment(data_name, X_train, y_train, X_test, y_test, method_list, params): 33 | for method, k_, lambda_ in method_list: 34 | for alpha in [0.2, 0.1, 0.05]: 35 | if lambda_ == "auto": 36 | k_list = [] 37 | lambda_list = [] 38 | # Searching k_ and lambda_ 39 | for k in range(15): 40 | rfclf = CoverForestClassifier( 41 | n_estimators=params[method]["n_estimators"], 42 | method=method, 43 | allow_empty_sets=True, 44 | cv=10, 45 | k_init="auto", 46 | lambda_init="auto", 47 | n_jobs=-1, 48 | random_state=randints1[k], 49 | ) 50 | rfclf.fit(X_train, y_train, alpha=alpha) 51 | k_list.append(rfclf.k_star_) 52 | lambda_list.append(rfclf.lambda_star_) 53 | k_best = mode(k_list).mode 54 | lambda_best = mode(lambda_list).mode 55 | print(f"Multiround parameter searching: Round {k + 1} of 15.") 56 | else: 57 | k_best = k_ 58 | lambda_best = lambda_ 59 | n_preds = [] 60 | coverage_probs = [] 61 | echo = [] 62 | train_times = [] 63 | test_times = [] 64 | for k in range(50): 65 | rfclf = CoverForestClassifier( 66 | n_estimators=params[method]["n_estimators"], 67 | method=method, 68 | allow_empty_sets=True, 69 | cv=10, 70 | k_init=k_best, 71 | lambda_init=lambda_best, 72 | n_jobs=-1, 73 | n_forests_per_fold=1, 74 | random_state=randints2[k], 75 | ) 76 | curr1 = time.time() 77 | rfclf.fit(X_train, y_train, alpha=alpha) 78 | curr2 = time.time() 79 | curr3 = time.time() 80 | _, y_pred = rfclf.predict(X_test, alpha=alpha, binary_output=False) 81 | curr4 = time.time() 82 | train_times.append(curr2 - curr1) 83 | test_times.append(curr4 - curr3) 84 | print("Training + test times:", curr2 - curr1, curr4 - curr3) 85 | avg_size = np.mean([y_pred[i].shape[0] for i in range(len(y_pred))]) 86 | cvg_prob = np.mean([y_test[i] in y_pred[i] for i in range(len(y_pred))]) 87 | n_preds.append(avg_size) 88 | coverage_probs.append(cvg_prob) 89 | echo.append(k + 1) 90 | print("echo", k, ", alpha =", alpha) 91 | print(f"average size = {avg_size}, coverage = {cvg_prob}.") 92 | 93 | method_ = method.replace("_", "") 94 | filename = f"{data_name}_{method_}_{k_}_{alpha}.csv" 95 | with open(filename, "w", newline="") as f: 96 | write = csv.writer(os.path.join(result_folder, f)) 97 | write.writerows( 98 | [echo, n_preds, coverage_probs, train_times, test_times] 99 | ) 100 | 101 | 102 | # Set up methods and parameters. 103 | method_list = [ 104 | ("bootstrap", "auto", "auto"), 105 | ("bootstrap", 0, 0), 106 | ("cv", "auto", "auto"), 107 | ("cv", 0, 0), 108 | ("split", "auto", "auto"), 109 | ("split", 0, 0), 110 | ] 111 | 112 | param_dict = { 113 | "bootstrap": {"n_estimators": int(1000 * 0.9)}, 114 | "cv": {"n_estimators": 100}, 115 | "split": {"n_estimators": int(1000 * 0.9)}, 116 | } 117 | 118 | 119 | ############## 120 | # Mice dataset 121 | ############## 122 | 123 | MiceData = pd.read_csv("data/MiceClean.csv") 124 | 125 | X = MiceData.drop(columns=["class", "MouseID"]) 126 | y = MiceData["class"] 127 | y = y.values.reshape(-1, 1) 128 | y = y[:, 0] 129 | 130 | seed = 1 131 | X_train, X_test, y_train, y_test = train_test_split( 132 | X, y, test_size=0.20, stratify=y, random_state=seed 133 | ) 134 | 135 | experiment("MiceData", X_train, y_train, X_test, y_test, method_list, param_dict) 136 | 137 | 138 | ##################### 139 | # WineQuality dataset 140 | ##################### 141 | 142 | wine_quality = pd.read_csv("data/winequality-white.csv", sep=";") 143 | 144 | seed = 123 145 | 146 | sample_wine = wine_quality.sample(n=2000, random_state=seed) 147 | 148 | X = sample_wine.drop(columns=["quality"]) 149 | y = sample_wine["quality"] 150 | y = y.to_numpy() 151 | 152 | X_train, X_test, y_train, y_test = train_test_split( 153 | X, y, test_size=0.20, stratify=y, random_state=seed 154 | ) 155 | 156 | # Normalize data to prevent numerical overflows. 157 | scaler = StandardScaler() 158 | X_train = scaler.fit_transform(X_train) 159 | X_test = scaler.transform(X_test) 160 | 161 | experiment("WineData", X_train, y_train, X_test, y_test, method_list, param_dict) 162 | 163 | 164 | #################### 165 | # Myocardial dataset 166 | #################### 167 | 168 | myocardial = fetch_ucirepo(id=579) 169 | 170 | X = myocardial.data.features 171 | y = myocardial.data.targets 172 | 173 | y = y["LET_IS"] 174 | y = y.to_numpy() 175 | 176 | seed = 1 177 | 178 | X_train, X_test, y_train, y_test = train_test_split( 179 | X, y, test_size=0.20, stratify=y, random_state=seed 180 | ) 181 | 182 | experiment("MyocData", X_train, y_train, X_test, y_test, method_list, param_dict) 183 | 184 | 185 | ############### 186 | # MNIST dataset 187 | ############### 188 | 189 | (X_train, y_train), (X_test, y_test) = tf.keras.datasets.mnist.load_data() 190 | 191 | X_train = X_train.reshape((X_train.shape[0], -1)) 192 | X_test = X_test.reshape((X_test.shape[0], -1)) 193 | 194 | X_train = X_train.astype("float32") 195 | X_test = X_test.astype("float32") 196 | 197 | X_train = X_train / 255 # (0,255] / 255 --> (0,1] 198 | X_test = X_test / 255 199 | 200 | X_train = X_train[0:1000] 201 | y_train = y_train[0:1000] 202 | 203 | X_test = X_test[0:250] 204 | y_test = y_test[0:250] 205 | 206 | experiment("MNISTData", X_train, y_train, X_test, y_test, method_list, param_dict) 207 | -------------------------------------------------------------------------------- /docs/_static/scripts/sphinx-book-theme.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"scripts/sphinx-book-theme.js","mappings":"mBASA,IAAIA,EAAsBC,IACG,WAAvBC,SAASC,WACXF,IACSC,SAASE,iBAClBF,SAASE,iBAAiB,mBAAoBH,GAE9CC,SAASG,YAAY,sBAAsB,WACd,YAAvBH,SAASC,YAA0BF,GACzC,GACF,EAkKFK,OAAOC,aAtCY,KACjB,IAAIC,EAAQN,SAASO,cAAc,cACrBD,EAAME,mBAGPC,UAAUC,SAAS,wBAC9BJ,EAAMK,mBACJ,WACA,iDAIJC,WAAW,EA2BbR,OAAOS,iBAzJgB,KACrB,IAAIC,EACDd,SAASe,mBAAoD,OAA/Bf,SAASe,mBACvCf,SAASgB,yBAC6B,OAArChB,SAASgB,wBACb,IAAIC,EAASjB,SAASkB,gBACjBJ,GAQHK,QAAQC,IAAI,8BACRpB,SAASqB,eACXrB,SAASqB,iBACArB,SAASsB,sBAClBtB,SAASsB,yBAXXH,QAAQC,IAAI,+BACRH,EAAOM,kBACTN,EAAOM,oBACEN,EAAOO,yBAChBP,EAAOO,0BASX,EA0IF1B,GAzHkB,KAChB,IAAI2B,EAAgB,GACpB,IAwCIC,EAAc,IAAIC,sBAxCA,CAACC,EAASC,KAE9BD,EAAQE,SAASC,IACf,GAAIA,EAAMC,eAERP,EAAcQ,KAAKF,EAAMG,aAGzB,IAAK,IAAIC,EAAK,EAAGA,EAAKV,EAAcW,OAAQD,IAC1C,GAAIV,EAAcU,KAAQJ,EAAMG,OAAQ,CACtCT,EAAcY,OAAOF,EAAI,GACzB,KACF,CAEJ,IAIEV,EAAcW,OAAS,EACzBpC,SAASO,cAAc,4BAA4BE,UAAU6B,IAAI,QAEjEtC,SACGO,cAAc,4BACdE,UAAU8B,OAAO,OACtB,GAYY,CAEZC,WAAY,qBAaVC,EAAiB,GATG,CACtB,aACA,WACA,SACA,iBACA,aACA,UACA,UAGcX,SAASK,IAEvBM,EAAeR,KAEX,IAAIE,IACJ,QAAQA,IACR,IAAIA,EAAGO,QAAQ,IAAK,OACpB,QAAQP,EAAGO,QAAQ,IAAK,OAE3B,IAEH1C,SAAS2C,iBAAiBF,EAAeG,KAAK,OAAOd,SAASK,IAC5DT,EAAYmB,QAAQV,EAAG,IAIJ,IAAIR,sBA1CO,CAACC,EAASC,KAEpCD,EAAQ,GAAGkB,mBAAmBC,EAAI,EACpC/C,SAASgD,KAAKvC,UAAU6B,IAAI,YAE5BtC,SAASgD,KAAKvC,UAAU8B,OAAO,WACjC,IAqCaM,QAAQ7C,SAASO,cAAc,4BAA4B,IAmD5ET,GA1BA,WACE,IAAImD,EAAkB,CACpB,0BACA,aACA,qBACA,sBACA,wBACA,qBACA,qBACA,cACAL,KAAK,KACP5C,SAAS2C,iBAAiBM,GAAiBnB,SAASK,IAClDA,EAAG1B,UAAU6B,IAAI,UAAU,GAE/B,G","sources":["webpack://sphinx_book_theme/./src/sphinx_book_theme/assets/scripts/index.js"],"sourcesContent":["// Import CSS variables\n// ref: https://css-tricks.com/getting-javascript-to-talk-to-css-and-sass/\nimport \"../styles/index.scss\";\n\n/**\n * A helper function to load scripts when the DOM is loaded.\n * This waits for everything to be on the page first before running, since\n * some functionality doesn't behave properly until everything is ready.\n */\nvar sbRunWhenDOMLoaded = (cb) => {\n if (document.readyState != \"loading\") {\n cb();\n } else if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", cb);\n } else {\n document.attachEvent(\"onreadystatechange\", function () {\n if (document.readyState == \"complete\") cb();\n });\n }\n};\n\n/**\n * Toggle full-screen with button\n *\n * There are some browser-specific hacks in here:\n * - Safari requires a `webkit` prefix, so this uses conditionals to check for that\n * ref: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API\n */\nvar toggleFullScreen = () => {\n var isInFullScreen =\n (document.fullscreenElement && document.fullscreenElement !== null) ||\n (document.webkitFullscreenElement &&\n document.webkitFullscreenElement !== null);\n let docElm = document.documentElement;\n if (!isInFullScreen) {\n console.log(\"[SBT]: Entering full screen\");\n if (docElm.requestFullscreen) {\n docElm.requestFullscreen();\n } else if (docElm.webkitRequestFullscreen) {\n docElm.webkitRequestFullscreen();\n }\n } else {\n console.log(\"[SBT]: Exiting full screen\");\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n }\n};\n\n/**\n * Manage scrolling behavior. This is primarily two things:\n *\n * 1. Hide the Table of Contents any time sidebar content is on the screen.\n *\n * This will be triggered any time a sidebar item enters or exits the screen.\n * It adds/removes items from an array if they have entered the screen, and\n * removes them when they exit the screen. It hides the TOC if anything is\n * on-screen.\n *\n * ref: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API\n *\n * 2. Add a `scrolled` class to to trigger CSS changes.\n */\nvar initTocHide = () => {\n var onScreenItems = [];\n let hideTocCallback = (entries, observer) => {\n // Check whether any sidebar item is displayed\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n // If an element just came on screen, add it our list\n onScreenItems.push(entry.target);\n } else {\n // Otherwise, if it's in our list then remove it\n for (let ii = 0; ii < onScreenItems.length; ii++) {\n if (onScreenItems[ii] === entry.target) {\n onScreenItems.splice(ii, 1);\n break;\n }\n }\n }\n });\n\n // Hide the TOC if any margin content is displayed on the screen\n if (onScreenItems.length > 0) {\n document.querySelector(\"div.bd-sidebar-secondary\").classList.add(\"hide\");\n } else {\n document\n .querySelector(\"div.bd-sidebar-secondary\")\n .classList.remove(\"hide\");\n }\n };\n let manageScrolledClassOnBody = (entries, observer) => {\n // The pixel is at the top, so if we're < 0 that it means we've scrolled\n if (entries[0].boundingClientRect.y < 0) {\n document.body.classList.add(\"scrolled\");\n } else {\n document.body.classList.remove(\"scrolled\");\n }\n };\n\n // Set up the intersection observer to watch all margin content\n let options = {\n // Trigger callback when the top of a margin item is 1/3 up the screen\n rootMargin: \"0px 0px -33% 0px\",\n };\n let tocObserver = new IntersectionObserver(hideTocCallback, options);\n // TODO: deprecate popout after v0.5.0\n const selectorClasses = [\n \"marginnote\",\n \"sidenote\",\n \"margin\",\n \"margin-caption\",\n \"full-width\",\n \"sidebar\",\n \"popout\",\n ];\n let marginSelector = [];\n selectorClasses.forEach((ii) => {\n // Use three permutations of each class name because `tag_` and `_` used to be supported\n marginSelector.push(\n ...[\n `.${ii}`,\n `.tag_${ii}`,\n `.${ii.replace(\"-\", \"_\")}`,\n `.tag_${ii.replace(\"-\", \"_\")}`,\n ],\n );\n });\n document.querySelectorAll(marginSelector.join(\", \")).forEach((ii) => {\n tocObserver.observe(ii);\n });\n\n // Set up the observer to check if we've scrolled from top of page\n let scrollObserver = new IntersectionObserver(manageScrolledClassOnBody);\n scrollObserver.observe(document.querySelector(\".sbt-scroll-pixel-helper\"));\n};\n\n/**\n * Activate Thebe with a custom button click.\n */\nvar initThebeSBT = () => {\n var title = document.querySelector(\"section h1\");\n var sibling = title.nextElementSibling;\n // If the next element after the title isn't a thebe button, add one now.\n // That way it is initiatlized when thebe is first-clicked and isn't re-added after.\n if (!sibling.classList.contains(\"thebe-launch-button\")) {\n title.insertAdjacentHTML(\n \"afterend\",\n \"\",\n );\n }\n // This function is provided by sphinx-thebe\n initThebe();\n};\n\n/**\n * Add no print class to certain DOM elements\n */\n\nfunction addNoPrint() {\n var noPrintSelector = [\n \".bd-header-announcement\",\n \".bd-header\",\n \".bd-header-article\",\n \".bd-sidebar-primary\",\n \".bd-sidebar-secondary\",\n \".bd-footer-article\",\n \".bd-footer-content\",\n \".bd-footer\",\n ].join(\",\");\n document.querySelectorAll(noPrintSelector).forEach((ii) => {\n ii.classList.add(\"noprint\");\n });\n}\n\n/**\n * Set up callback functions for UI click actions\n */\nwindow.initThebeSBT = initThebeSBT;\nwindow.toggleFullScreen = toggleFullScreen;\n\n/**\n * Set up functions to load when the DOM is ready\n */\nsbRunWhenDOMLoaded(initTocHide);\nsbRunWhenDOMLoaded(addNoPrint);\n"],"names":["sbRunWhenDOMLoaded","cb","document","readyState","addEventListener","attachEvent","window","initThebeSBT","title","querySelector","nextElementSibling","classList","contains","insertAdjacentHTML","initThebe","toggleFullScreen","isInFullScreen","fullscreenElement","webkitFullscreenElement","docElm","documentElement","console","log","exitFullscreen","webkitExitFullscreen","requestFullscreen","webkitRequestFullscreen","onScreenItems","tocObserver","IntersectionObserver","entries","observer","forEach","entry","isIntersecting","push","target","ii","length","splice","add","remove","rootMargin","marginSelector","replace","querySelectorAll","join","observe","boundingClientRect","y","body","noPrintSelector"],"sourceRoot":""} 2 | -------------------------------------------------------------------------------- /coverforest/metrics.py: -------------------------------------------------------------------------------- 1 | # coverforest authors: Donlapark Ponnoprat 2 | # Panisara Meehinkong 3 | # License: BSD 3 clause 4 | 5 | from numbers import Real 6 | 7 | import numpy as np 8 | from sklearn.utils._array_api import _average 9 | from sklearn.utils._param_validation import ( 10 | Interval, 11 | validate_params, 12 | ) 13 | from sklearn.utils.validation import check_consistent_length, column_or_1d 14 | 15 | 16 | @validate_params( 17 | { 18 | "y_true": ["array-like", "sparse matrix"], 19 | "y_pred": [tuple, "array-like", "sparse matrix"], 20 | "beta": [Interval(Real, 0.0, None, closed="both")], 21 | "labels": ["array-like", None], 22 | "sample_weight": ["array-like", None], 23 | }, 24 | prefer_skip_nested_validation=True, 25 | ) 26 | def classification_coverage_score(y_true, y_pred, *, labels=None, sample_weight=None): 27 | """Compute the empirical coverage for classification prediction sets. 28 | 29 | The coverage score measures the proportion of true labels that are included 30 | in the prediction sets. 31 | 32 | Parameters 33 | ---------- 34 | y_true : array-like of shape (n_samples,) 35 | Ground truth (correct) labels. 36 | 37 | y_pred : tuple, list or array-like of shape (n_samples, n_classes) 38 | Binary matrix indicating the predicted set for each sample, where 1 39 | indicates the class is included in the prediction set and 0 indicates 40 | it is not. 41 | 42 | labels : array-like of shape (n_classes,), default=None 43 | List of labels in the same order of the columns of y_pred. 44 | 45 | sample_weight : array-like of shape (n_samples,), default=None 46 | Sample weights. If None, then samples are equally weighted. 47 | 48 | Returns 49 | ------- 50 | score : float 51 | Returns the empirical coverage, i.e., the proportion of true labels 52 | included in the prediction sets, weighted by sample_weight. 53 | Best value is 1 and worst value is 0. 54 | 55 | Examples 56 | -------- 57 | >>> import numpy as np 58 | >>> from metrics import classification_coverage_score 59 | >>> y_true = [0, 1, 2] 60 | >>> y_pred = np.array([[1, 0, 1], [0, 0, 1], [0, 0, 1]]) 61 | >>> labels = [0, 1, 2] 62 | >>> classification_coverage_score(y_true, y_pred, labels=labels) 63 | 0.66... 64 | """ 65 | 66 | if isinstance(y_pred, tuple): 67 | y_pred = y_pred[1] 68 | 69 | y_true = column_or_1d(y_true) 70 | n = len(y_pred) 71 | assert y_true.shape[0] == n 72 | check_consistent_length(y_true, sample_weight) 73 | 74 | if isinstance(y_pred, list): 75 | is_in_y_pred = [y_true[i] in y_pred[i] for i in range(n)] 76 | else: 77 | if labels is None: 78 | raise ValueError("`labels` must be specified when `y_pred` is an array.") 79 | class_to_idx = {c: i for i, c in enumerate(labels)} 80 | y_idx = np.vectorize(class_to_idx.__getitem__)(y_true) 81 | is_in_y_pred = y_pred[np.arange(len(y_pred)), y_idx] 82 | 83 | return float(_average(is_in_y_pred, weights=sample_weight)) 84 | 85 | 86 | @validate_params( 87 | { 88 | "y_true": ["array-like", "sparse matrix"], 89 | "y_pred": ["array-like", "sparse matrix"], 90 | "sample_weight": ["array-like", None], 91 | }, 92 | prefer_skip_nested_validation=True, 93 | ) 94 | def average_set_size_loss(y_true, y_pred): 95 | """Compute the average size of classification prediction sets. 96 | 97 | For each sample, the set size is the number of classes included in 98 | the prediction set (sum of binary indicators). 99 | 100 | Parameters 101 | ---------- 102 | y_true : array-like of shape (n_samples,) 103 | Ground truth (correct) labels. 104 | 105 | y_pred : tuple, list or array-like of shape (n_samples, n_classes) 106 | Binary matrix indicating the predicted set for each sample, where 1 107 | indicates the class is included in the prediction set and 0 indicates 108 | it is not. 109 | 110 | Returns 111 | ------- 112 | score : float 113 | Returns the average prediction set size. 114 | Minimum possible value is 0, maximum is n_classes. 115 | 116 | Examples 117 | -------- 118 | >>> import numpy as np 119 | >>> from metrics import average_set_size_loss 120 | >>> y_pred = np.array([[1, 0, 0], [1, 1, 0], [0, 0, 1]]) 121 | >>> average_set_size_loss(y_pred) 122 | 1.333... 123 | """ 124 | 125 | if isinstance(y_pred, tuple): 126 | y_pred = y_pred[1] 127 | 128 | if isinstance(y_pred, list): 129 | y_sizes = [len(y_pred) for y_pred in y_pred] 130 | else: 131 | y_sizes = y_pred.sum(axis=1) 132 | 133 | return float(_average(y_sizes)) 134 | 135 | 136 | @validate_params( 137 | { 138 | "y_true": ["array-like", "sparse matrix"], 139 | "y_pred": ["array-like", "sparse matrix"], 140 | "sample_weight": ["array-like", None], 141 | }, 142 | prefer_skip_nested_validation=True, 143 | ) 144 | def regression_coverage_score(y_true, y_pred, *, sample_weight=None): 145 | """Compute the empirical coverage for regression prediction intervals. 146 | 147 | The coverage score measures the proportion of true values that fall 148 | within the predicted intervals. 149 | 150 | Parameters 151 | ---------- 152 | y_true : array-like of shape (n_samples,) 153 | Ground truth (correct) target values. 154 | 155 | y_pred : tuple, list or array-like of shape (n_samples, 2) 156 | Predicted intervals, where each row contains [lower_bound, upper_bound]. 157 | 158 | sample_weight : array-like of shape (n_samples,), default=None 159 | Sample weights. If None, then samples are equally weighted. 160 | 161 | Returns 162 | ------- 163 | score : float 164 | Returns the empirical coverage, i.e., the proportion of true values 165 | falling within the prediction intervals, weighted by sample_weight. 166 | Best value is 1 and worst value is 0. 167 | 168 | Examples 169 | -------- 170 | >>> import numpy as np 171 | >>> from metrics import regression_coverage_score 172 | >>> y_true = [1.0, -2.0, 3.0] 173 | >>> y_pred = np.array([[0.5, 1.5], [1.5, 2.5], [2.5, 3.5]]) 174 | >>> regression_coverage_score(y_true, y_pred) 175 | 0.66... 176 | """ 177 | 178 | if isinstance(y_pred, tuple): 179 | y_pred = y_pred[1] 180 | 181 | y_true = column_or_1d(y_true) 182 | check_consistent_length(y_true, y_pred, sample_weight) 183 | 184 | low = y_pred[:, 0] 185 | high = y_pred[:, 1] 186 | return float(_average((low <= y_true) & (y_true <= high), weights=sample_weight)) 187 | 188 | 189 | @validate_params( 190 | { 191 | "y_true": ["array-like", "sparse matrix"], 192 | "y_pred": ["array-like", "sparse matrix"], 193 | "sample_weight": ["array-like", None], 194 | }, 195 | prefer_skip_nested_validation=True, 196 | ) 197 | def average_interval_length_loss(y_true, y_pred): 198 | """Compute the average length of regression prediction intervals. 199 | 200 | For each sample, the interval length is the difference between 201 | the upper and lower bounds. 202 | 203 | Parameters 204 | ---------- 205 | y_true : array-like of shape (n_samples,) 206 | Ground truth (correct) labels. 207 | 208 | y_pred : tuple, list or array-like of shape (n_samples, 2) 209 | Predicted intervals, where each row contains [lower_bound, upper_bound]. 210 | 211 | Returns 212 | ------- 213 | score : float 214 | Returns the average interval length. 215 | Minimum possible value is 0, no maximum value. 216 | 217 | Examples 218 | -------- 219 | >>> import numpy as np 220 | >>> from metrics import average_interval_length_loss 221 | >>> y_pred = np.array([[0.5, 2.5], [1.5, 4.5], [2.5, 3.5]]) 222 | >>> average_interval_length_loss(y_pred) 223 | 2.0 224 | """ 225 | 226 | if isinstance(y_pred, tuple): 227 | y_pred = y_pred[1] 228 | 229 | low = y_pred[:, 0] 230 | high = y_pred[:, 1] 231 | return float(_average(high - low)) 232 | -------------------------------------------------------------------------------- /docs/_static/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.8 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 62 | ${messages[locale]['copy_success']} 63 | 64 | 65 | ` 66 | 67 | // If the user specified their own SVG use that, otherwise use the default 68 | let iconCopy = ``; 69 | if (!iconCopy) { 70 | iconCopy = ` 71 | ${messages[locale]['copy_to_clipboard']} 72 | 73 | 74 | 75 | ` 76 | } 77 | 78 | /** 79 | * Set up copy/paste for code blocks 80 | */ 81 | 82 | const runWhenDOMLoaded = cb => { 83 | if (document.readyState != 'loading') { 84 | cb() 85 | } else if (document.addEventListener) { 86 | document.addEventListener('DOMContentLoaded', cb) 87 | } else { 88 | document.attachEvent('onreadystatechange', function() { 89 | if (document.readyState == 'complete') cb() 90 | }) 91 | } 92 | } 93 | 94 | const codeCellId = index => `codecell${index}` 95 | 96 | // Clears selected text since ClipboardJS will select the text when copying 97 | const clearSelection = () => { 98 | if (window.getSelection) { 99 | window.getSelection().removeAllRanges() 100 | } else if (document.selection) { 101 | document.selection.empty() 102 | } 103 | } 104 | 105 | // Changes tooltip text for a moment, then changes it back 106 | // We want the timeout of our `success` class to be a bit shorter than the 107 | // tooltip and icon change, so that we can hide the icon before changing back. 108 | var timeoutIcon = 2000; 109 | var timeoutSuccessClass = 1500; 110 | 111 | const temporarilyChangeTooltip = (el, oldText, newText) => { 112 | el.setAttribute('data-tooltip', newText) 113 | el.classList.add('success') 114 | // Remove success a little bit sooner than we change the tooltip 115 | // So that we can use CSS to hide the copybutton first 116 | setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) 117 | setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) 118 | } 119 | 120 | // Changes the copy button icon for two seconds, then changes it back 121 | const temporarilyChangeIcon = (el) => { 122 | el.innerHTML = iconCheck; 123 | setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) 124 | } 125 | 126 | const addCopyButtonToCodeCells = () => { 127 | // If ClipboardJS hasn't loaded, wait a bit and try again. This 128 | // happens because we load ClipboardJS asynchronously. 129 | if (window.ClipboardJS === undefined) { 130 | setTimeout(addCopyButtonToCodeCells, 250) 131 | return 132 | } 133 | 134 | // Add copybuttons to all of our code cells 135 | const COPYBUTTON_SELECTOR = 'div.highlight pre'; 136 | const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) 137 | codeCells.forEach((codeCell, index) => { 138 | const id = codeCellId(index) 139 | codeCell.setAttribute('id', id) 140 | 141 | const clipboardButton = id => 142 | `` 145 | codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) 146 | }) 147 | 148 | function escapeRegExp(string) { 149 | return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string 150 | } 151 | 152 | /** 153 | * Removes excluded text from a Node. 154 | * 155 | * @param {Node} target Node to filter. 156 | * @param {string} exclude CSS selector of nodes to exclude. 157 | * @returns {DOMString} Text from `target` with text removed. 158 | */ 159 | function filterText(target, exclude) { 160 | const clone = target.cloneNode(true); // clone as to not modify the live DOM 161 | if (exclude) { 162 | // remove excluded nodes 163 | clone.querySelectorAll(exclude).forEach(node => node.remove()); 164 | } 165 | return clone.innerText; 166 | } 167 | 168 | // Callback when a copy button is clicked. Will be passed the node that was clicked 169 | // should then grab the text and replace pieces of text that shouldn't be used in output 170 | function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { 171 | var regexp; 172 | var match; 173 | 174 | // Do we check for line continuation characters and "HERE-documents"? 175 | var useLineCont = !!lineContinuationChar 176 | var useHereDoc = !!hereDocDelim 177 | 178 | // create regexp to capture prompt and remaining line 179 | if (isRegexp) { 180 | regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') 181 | } else { 182 | regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') 183 | } 184 | 185 | const outputLines = []; 186 | var promptFound = false; 187 | var gotLineCont = false; 188 | var gotHereDoc = false; 189 | const lineGotPrompt = []; 190 | for (const line of textContent.split('\n')) { 191 | match = line.match(regexp) 192 | if (match || gotLineCont || gotHereDoc) { 193 | promptFound = regexp.test(line) 194 | lineGotPrompt.push(promptFound) 195 | if (removePrompts && promptFound) { 196 | outputLines.push(match[2]) 197 | } else { 198 | outputLines.push(line) 199 | } 200 | gotLineCont = line.endsWith(lineContinuationChar) & useLineCont 201 | if (line.includes(hereDocDelim) & useHereDoc) 202 | gotHereDoc = !gotHereDoc 203 | } else if (!onlyCopyPromptLines) { 204 | outputLines.push(line) 205 | } else if (copyEmptyLines && line.trim() === '') { 206 | outputLines.push(line) 207 | } 208 | } 209 | 210 | // If no lines with the prompt were found then just use original lines 211 | if (lineGotPrompt.some(v => v === true)) { 212 | textContent = outputLines.join('\n'); 213 | } 214 | 215 | // Remove a trailing newline to avoid auto-running when pasting 216 | if (textContent.endsWith("\n")) { 217 | textContent = textContent.slice(0, -1) 218 | } 219 | return textContent 220 | } 221 | 222 | 223 | var copyTargetText = (trigger) => { 224 | var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); 225 | 226 | // get filtered text 227 | let exclude = '.linenos'; 228 | 229 | let text = filterText(target, exclude); 230 | return formatCopyText(text, '', false, true, true, true, '', '') 231 | } 232 | 233 | // Initialize with a callback so we can modify the text before copy 234 | const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) 235 | 236 | // Update UI with error/success messages 237 | clipboard.on('success', event => { 238 | clearSelection() 239 | temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) 240 | temporarilyChangeIcon(event.trigger) 241 | }) 242 | 243 | clipboard.on('error', event => { 244 | temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) 245 | }) 246 | } 247 | 248 | runWhenDOMLoaded(addCopyButtonToCodeCells) 249 | --------------------------------------------------------------------------------