Skip to content

docs: add in-depth examples of online martingale exchangeability tests#905

Open
hmaissoro wants to merge 3 commits intomasterfrom
omt-docs-only
Open

docs: add in-depth examples of online martingale exchangeability tests#905
hmaissoro wants to merge 3 commits intomasterfrom
omt-docs-only

Conversation

@hmaissoro
Copy link
Copy Markdown
Collaborator

No description provided.

hmaissoro and others added 2 commits April 20, 2026 14:02
* init: online martingale tests

* init: raw OnlineMartingaleTest class

* v0 of complete api

* some improves on V0

* add references to class docstring

* Improve references

* not need control here

* remove unnecessary control

* remove kde_min_sample_size

* update density estimation function

* correct is_exchangeable property

* update density estimation function

* rename raise_warning warn

* rename min_history_to_decide min_sample_size_to_decide

* rename folder

* init tests

* fix format

* update docstring

* fix typing

* update summary method

* update docstring

* fix docstring example

* update is_exchangeable

* jump_size should be (0,1)

* update summary

* update tests

* fix format

* fix typing

* fix typing

* update docstring and warning

* add init

* docs: quickstart online martingale exchangeability tests

* fix format

* improve intro

* update example

* update example

* improve comment

* update readme

* rename

* rename

* init linear regression example

* update doc

* improve example

* improve plot

* replace "confidence_level" by "test_level"

* rename "non-conformity" score to "conformity" score

* rename online_martingale_tests.py online.py

* rename test_online_martingale_tests.py test_online.py

* rename min_sample_size_to_decide burn_in

* move example to advanced analysis section

* docs: improve advanced online martingale examples and warnings

Agent-Logs-Url: https://github.com/scikit-learn-contrib/MAPIE/sessions/103757d3-0e48-4ac6-af2d-be1ea1f6c3ec

Co-authored-by: hmaissoro <45612115+hmaissoro@users.noreply.github.com>

* use MAPIE estimator

* rename online.py online_tests.py

* merge folders

* merge folders

* add tests for reach 100% coverage

* _prepare_estimator is now a static method

* update docstring

* update example

* Update regression example

* update docstring's example

* Fix coverage

* remove docs

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@hmaissoro hmaissoro marked this pull request as ready for review April 20, 2026 12:37
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://scikit-learn-contrib.github.io/MAPIE/pr-preview/pr-905/

Built to branch gh-pages at 2026-04-20 13:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Collaborator

@GBrelurut GBrelurut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.
I have some suggestions to improve implementation.

task : Optional[Literal["classification", "regression"]], default=None
Task type. If ``None``, the task is inferred from `y`.

test_method : {"jumper_martingale", "plugin_martingale"}, default="jumper_martingale"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if I want both ?

estimator = self.mapie_estimator
assert estimator is not None

if not estimator._is_fitted:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should not be done silently

"Plug-in Martingales for Testing Exchangeability on-line".
In Proceedings of the 29th ICML. Algorithm 1, page 3.
"""
# %%
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants