Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The rules for CHANGELOG file:
------------------
- Updating ``FPS`` to allow a numpy array of ints as an initialize parameter (#145)
- Supported Python versions are now ranging from 3.9 - 3.12.
- Updating ``skmatter.datasets`` submodule to support sklearn 1.5.0 (#229)

0.2.0 (2023/08/24)
------------------
Expand Down
10 changes: 9 additions & 1 deletion src/skmatter/datasets/_base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
from os.path import dirname, join

import numpy as np
from sklearn.utils import Bunch, check_pandas_support
import sklearn


if sklearn.__version__ >= "1.5.0":
from sklearn.utils._optional_dependencies import check_pandas_support
else:
from sklearn.utils import check_pandas_support

from sklearn.utils import Bunch


def load_nice_dataset():
Expand Down
3 changes: 2 additions & 1 deletion tests/test_dch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def test_selected_idx_and_scores(self):
selector.fit(self.T, self.y)
self.assertTrue(np.allclose(selector.selected_idx_, self.idx))

feature_residuals = selector.score_feature_matrix(self.T)
# takes abs to avoid numerical noise changing the sign of PCA projections
feature_residuals = np.abs(selector.score_feature_matrix(self.T))
val = np.max(
np.abs(
(self.feature_residuals_100 - feature_residuals[100])
Expand Down