Skip to content

Commit 10273ed

Browse files
DOC: revert v1-related README changes, to hide them before actual v1 release (#690)
1 parent 919ca41 commit 10273ed

File tree

1 file changed

+17
-28
lines changed

1 file changed

+17
-28
lines changed

README.rst

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ Here's a quick instantiation of MAPIE models for regression and classification p
5858
.. code:: python
5959
6060
# Uncertainty quantification for regression problem
61-
from mapie.regression import SplitConformalRegressor
62-
mapie_regressor = SplitConformalRegressor(estimator=regressor)
61+
from mapie.regression import MapieRegressor
62+
mapie_regressor = MapieRegressor(estimator=regressor, method='plus', cv=5)
6363
6464
.. code:: python
6565
6666
# Uncertainty quantification for classification problem
67-
from mapie.classification import _MapieClassifier
68-
mapie_classifier = _MapieClassifier(estimator=classifier, method='score', cv=5)
67+
from mapie.classification import MapieClassifier
68+
mapie_classifier = MapieClassifier(estimator=classifier, method='score', cv=5)
6969
7070
Implemented methods in **MAPIE** respect three fundamental pillars:
7171

@@ -79,17 +79,8 @@ Implemented methods in **MAPIE** respect three fundamental pillars:
7979
🔗 Requirements
8080
===============
8181

82-
**MAPIE** runs on:
83-
84-
- Python >=3.9, <3.12
85-
- NumPy >=1.23
86-
- scikit-learn >=1.4
87-
88-
Note that even though we're not officially supporting and testing it, **MAPIE** may run using either:
89-
90-
- Python >=3.12, without using multi-processing (ie, ``n_jobs=-1``)
91-
- Python <3.9
92-
- scikit-learn <1.4, provided SciPy <=1.10
82+
- **MAPIE** runs on Python 3.7+.
83+
- **MAPIE** stands on the shoulders of giants. Its only internal dependencies are `scikit-learn <https://scikit-learn.org/stable/>`_ and `numpy=>1.21 <https://numpy.org/>`_.
9384

9485

9586
🛠 Installation
@@ -121,21 +112,19 @@ As **MAPIE** is compatible with the standard scikit-learn API, you can see that
121112
from sklearn.linear_model import LinearRegression
122113
from sklearn.datasets import make_regression
123114
from sklearn.model_selection import train_test_split
124-
from mapie.regression import SplitConformalRegressor
125115
126-
X, y = make_regression(n_samples=500, n_features=1, noise=20, random_state=59)
127-
X_train_conformalize, X_test, y_train_conformalize, y_test = train_test_split(X, y, test_size=0.5)
128-
X_train, X_conformalize, y_train, y_conformalize = train_test_split(X_train_conformalize, y_train_conformalize, test_size=0.5)
116+
from mapie.regression import MapieRegressor
117+
118+
119+
X, y = make_regression(n_samples=500, n_features=1)
120+
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5)
129121
130122
regressor = LinearRegression()
131-
regressor.fit(X_train, y_train)
132-
mapie_regressor = SplitConformalRegressor(
133-
regressor,
134-
confidence_level=[0.95, 0.68],
135-
)
136-
mapie_regressor.conformalize(X_conformalize, y_conformalize)
137123
138-
y_pred, y_pred_intervals = mapie_regressor.predict_interval(X_test)
124+
mapie_regressor = MapieRegressor(estimator=regressor, method='plus', cv=5)
125+
126+
mapie_regressor = mapie_regressor.fit(X_train, y_train)
127+
y_pred, y_pis = mapie_regressor.predict(X_test, alpha=[0.05, 0.32])
139128
140129
.. code:: python
141130
@@ -145,15 +134,15 @@ As **MAPIE** is compatible with the standard scikit-learn API, you can see that
145134
from sklearn.datasets import make_blobs
146135
from sklearn.model_selection import train_test_split
147136
148-
from mapie.classification import _MapieClassifier
137+
from mapie.classification import MapieClassifier
149138
150139
151140
X, y = make_blobs(n_samples=500, n_features=2, centers=3)
152141
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5)
153142
154143
classifier = LogisticRegression()
155144
156-
mapie_classifier = _MapieClassifier(estimator=classifier, method='score', cv=5)
145+
mapie_classifier = MapieClassifier(estimator=classifier, method='score', cv=5)
157146
158147
mapie_classifier = mapie_classifier.fit(X_train, y_train)
159148
y_pred, y_pis = mapie_classifier.predict(X_test, alpha=[0.05, 0.32])

0 commit comments

Comments
 (0)