Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing incremental_pca #998

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion tests/preprocessing/test_encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,6 @@ def test_unknown_category_transform_array():
enc.fit(dX)

result = enc.transform(x2)
match = r"Block contains previously unseen values \['d'\].*\n+.*Block info"
match = r"Block contains previously unseen values"
with pytest.raises(ValueError, match=match):
result.compute()
2 changes: 1 addition & 1 deletion tests/test_incremental_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def test_singular_values(svd_solver):
def test_whitening(svd_solver):
# Test that PCA and IncrementalPCA transforms match to sign flip.
X = datasets.make_low_rank_matrix(
1000, 10, tail_strength=0.0, effective_rank=2, random_state=1999
1000, 10, tail_strength=0.0, effective_rank=2, random_state=1998
)
X = da.from_array(X, chunks=[200, -1])
prec = 3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
shape = 60, 55
n_samples, n_features = shape
rng = check_random_state(42)
X = rng.randint(-100, 20, np.product(shape)).reshape(shape)
X = rng.randint(-100, 20, np.prod(shape)).reshape(shape)
X = sp.csr_matrix(np.maximum(X, 0), dtype=np.float64)
X.data[:] = 1 + np.log(X.data)
Xdense = X.toarray()
Expand Down
Loading