Skip to content

Commit 355ed13

Browse files
TimotheeMathieurth
andauthored
Fix fetch_openml broken pandas dependency (#87)
* Add pam algorithm * pam algorithm, not naive. * black reformat * Fix mistake in code * optimization of the algorithm for speed, review from @kno10 * remove generator for couples * fix mistake * Update pam review 2 * fix mistake * cython implementation * add test * disable openmp for windows and mac * fix black * fix setup.py for windows * remove test * change review * fix black * Add build, remove parallel computing * Apply suggestions from code review Co-authored-by: Roman Yurchak <[email protected]> * apply suggested change & rename alternating to alternate. * fix test * make build default. Allow max_iter = 0 for build-only algo * Test for method and init * test on blobs example * fix typo * fix difference long/long long windows vs linux * try another fix for windows/linux long difference * test another fix cython long/int on different platforms * test all in int, cython kmedoid * Add doc cluster module, update doc kmedoids, change examples. * fix black * fix openml * fix fetch_openml as_frame Co-authored-by: Roman Yurchak <[email protected]>
1 parent 04e54c2 commit 355ed13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/robust/plot_robust_classification_diabete.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
warnings.simplefilter(action="ignore", category=FutureWarning)
2323

24-
X, y = fetch_openml(name="diabetes", return_X_y=True)
24+
X, y = fetch_openml(name="diabetes", as_frame=False, return_X_y=True)
2525

2626
# replace the label names with 0 or 1
2727
y = (y == "tested_positive").astype(int)
@@ -83,3 +83,4 @@
8383

8484
# Remark : when using accuracy score, the optimal hyperparameters change and
8585
# for example the parameter c changes from 1.35 to 10.
86+
plt.show()

examples/robust/plot_robust_regression_california_houses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def quadratic_loss(est, X, y, X_test, y_test):
3434
return (est.predict(X_test) - y_test) ** 2
3535

3636

37-
X, y = fetch_california_housing(return_X_y=True)
37+
X, y = fetch_california_housing(as_frame=False, return_X_y=True)
3838
# Sub-sample for faster computation.
3939
X = X[:1000]
4040
y = y[:1000]

0 commit comments

Comments
 (0)