diff --git a/.readthedocs.yml b/.readthedocs.yml index b7ba60457..d8e222c73 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,6 +14,8 @@ conda: environment: environment.doc.yml sphinx: - builder: html + builder: + - html + - doctest configuration: doc/conf.py fail_on_warning: false diff --git a/mapie/metrics.py b/mapie/metrics.py index 4926ab782..bc320129b 100644 --- a/mapie/metrics.py +++ b/mapie/metrics.py @@ -1283,6 +1283,7 @@ def kolmogorov_smirnov_p_value(y_true: NDArray, y_score: NDArray) -> float: Examples -------- >>> import pandas as pd + >>> import numpy as np >>> from mapie.metrics import kolmogorov_smirnov_p_value >>> y_true = np.array([1, 0, 1, 0, 1, 0]) >>> y_score = np.array([0.8, 0.3, 0.5, 0.5, 0.7, 0.1]) @@ -1450,6 +1451,7 @@ def kuiper_p_value(y_true: NDArray, y_score: NDArray) -> float: Examples -------- >>> import pandas as pd + >>> import numpy as np >>> from mapie.metrics import kuiper_p_value >>> y_true = np.array([1, 0, 1, 0, 1, 0]) >>> y_score = np.array([0.8, 0.3, 0.5, 0.5, 0.7, 0.1]) diff --git a/mapie/mondrian.py b/mapie/mondrian.py index 003cf59f5..86c76549f 100644 --- a/mapie/mondrian.py +++ b/mapie/mondrian.py @@ -72,6 +72,7 @@ class MondrianCP(BaseEstimator): >>> import numpy as np >>> from sklearn.linear_model import LogisticRegression >>> from mapie.classification import MapieClassifier + >>> from mapie.mondrian import MondrianCP >>> X_toy = np.arange(9).reshape(-1, 1) >>> y_toy = np.stack([0, 0, 1, 0, 1, 2, 1, 2, 2]) >>> partition_toy = [0, 0, 0, 0, 1, 1, 1, 1, 1]