@@ -78,14 +78,17 @@ class SplitConformalRegressor:
7878 Examples
7979 --------
8080 >>> from mapie_v1.regression import SplitConformalRegressor
81+ >>> from mapie_v1.utils import train_conformalize_test_split
8182 >>> from sklearn.datasets import make_regression
8283 >>> from sklearn.model_selection import train_test_split
8384 >>> from sklearn.linear_model import Ridge
8485
8586 >>> X, y = make_regression(n_samples=500, n_features=2, noise=1.0)
86- >>> X_train, X_conf_test, y_train, y_conf_test = train_test_split(X, y)
87- >>> X_conformalize, X_test, y_conformalize, y_test = train_test_split(
88- ... X_conf_test, y_conf_test
87+ >>> (
88+ ... X_train, X_conformalize, X_test,
89+ ... y_train, y_conformalize, y_test
90+ ... ) = train_conformalize_test_split(
91+ ... X, y, train_size=0.6, conformalize_size=0.2, test_size=0.2, random_state=1
8992 ... )
9093
9194 >>> mapie_regressor = SplitConformalRegressor(
@@ -937,14 +940,17 @@ class ConformalizedQuantileRegressor:
937940 Examples
938941 --------
939942 >>> from mapie_v1.regression import ConformalizedQuantileRegressor
943+ >>> from mapie_v1.utils import train_conformalize_test_split
940944 >>> from sklearn.datasets import make_regression
941945 >>> from sklearn.model_selection import train_test_split
942946 >>> from sklearn.linear_model import QuantileRegressor
943947
944948 >>> X, y = make_regression(n_samples=500, n_features=2, noise=1.0)
945- >>> X_train, X_conf_test, y_train, y_conf_test = train_test_split(X, y)
946- >>> X_conformalize, X_test, y_conformalize, y_test = train_test_split(
947- ... X_conf_test, y_conf_test
949+ >>> (
950+ ... X_train, X_conformalize, X_test,
951+ ... y_train, y_conformalize, y_test
952+ ... ) = train_conformalize_test_split(
953+ ... X, y, train_size=0.6, conformalize_size=0.2, test_size=0.2, random_state=1
948954 ... )
949955
950956 >>> mapie_regressor = ConformalizedQuantileRegressor(
0 commit comments