Skip to content

Commit c32e48e

Browse files
committed
MAINT prepare release 0.14
1 parent 367fb90 commit c32e48e

File tree

3 files changed

+792
-1582
lines changed

3 files changed

+792
-1582
lines changed

examples/model_selection/plot_instance_hardness_cv.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
from sklearn.datasets import make_blobs
2929

3030
X, y = make_blobs(n_samples=[950, 50], centers=((-3, 0), (3, 0)), random_state=10)
31-
plt.scatter(X[:, 0], X[:, 1], c=y)
31+
_ = plt.scatter(X[:, 0], X[:, 1], c=y)
3232

3333
# %%
3434
# To introduce instance hardness in our dataset, we add some hard to classify samples:
3535
X_hard, y_hard = make_blobs(
3636
n_samples=10, centers=((3, 0), (-3, 0)), cluster_std=1, random_state=10
3737
)
3838
X, y = np.vstack((X, X_hard)), np.hstack((y, y_hard))
39-
plt.scatter(X[:, 0], X[:, 1], c=y)
39+
_ = plt.scatter(X[:, 0], X[:, 1], c=y)
4040

4141
# %%
4242
# Compare cross validation scores using `StratifiedKFold` and `InstanceHardnessCV`
@@ -69,7 +69,7 @@
6969
results = {}
7070
for cv in (
7171
StratifiedKFold(n_splits=5, shuffle=True, random_state=10),
72-
InstanceHardnessCV(estimator=LogisticRegression(), n_splits=5, random_state=10),
72+
InstanceHardnessCV(estimator=LogisticRegression()),
7373
):
7474
result = cross_validate(
7575
logistic_regression,
@@ -83,7 +83,7 @@
8383

8484
# %%
8585
ax = results.plot.box(vert=False, whis=[0, 100])
86-
ax.set(
86+
_ = ax.set(
8787
xlabel="Average precision",
8888
title="Cross validation scores with different splitters",
8989
xlim=(0, 1),

0 commit comments

Comments
 (0)