8000 TST Speed-up test_minibatch_dictionary_learning_dtype_match by jeremiedbb · Pull Request #23186 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

TST Speed-up test_minibatch_dictionary_learning_dtype_match #23186

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

Merged
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
3 changes: 3 additions & 0 deletions sklearn/decomposition/tests/test_dict_learning.py
39E6
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,12 @@ def test_minibatch_dictionary_learning_dtype_match(
batch_size=10,
fit_algorithm=fit_algorithm,
transform_algorithm=transform_algorithm,
max_iter=100,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set max_iter to get the new behavior (old behavior doesn't have stopping criterion besides n_iter).

tol=1e-1,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for this kind of test, we doesn't need good quality results

random_state=0,
)
dict_learner.fit(X.astype(data_type))

assert dict_learner.components_.dtype == expected_type
assert dict_learner.transform(X.astype(data_type)).dtype == expected_type
assert dict_learner._inner_stats[0].dtype == expected_type
Expand Down
0