Skip to content

Commit

Permalink
dask PCA: use incremental PCA for better memory efficieny
Browse files Browse the repository at this point in the history
  • Loading branch information
markotoplak committed Nov 6, 2023
1 parent 17dc2e4 commit 215ef9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Orange/projection/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ def _initialize_wrapped(self, X=None, Y=None):
else:
if params["iterated_power"] == "auto":
params["iterated_power"] = 0
params.pop("tol")

return dask_decomposition.PCA(**params)
return dask_decomposition.IncrementalPCA(**params)

return self.__wraps__(**params)

Expand Down
5 changes: 2 additions & 3 deletions Orange/tests/test_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ def test_improved_randomized_pca_sparse_data(self):

@unittest.skipIf(sklearn_version.startswith('0.20'),
"https://github.com/scikit-learn/scikit-learn/issues/12234")
@with_dasktable
def test_incremental_pca(self, prepare_table):
data = prepare_table(self.ionosphere)
def test_incremental_pca(self):
data = self.ionosphere
self.__ipca_test_helper(data, n_com=3, min_xpl_var=0.49)
self.__ipca_test_helper(data, n_com=32, min_xpl_var=1)

Expand Down

0 comments on commit 215ef9b

Please sign in to comment.