Skip to content

[MRG] remove identical assert in test_iforest_sparse#9112

Merged
agramfort merged 1 commit intoscikit-learn:masterfrom
albertcthomas:sc_test_iforest
Jun 13, 2017
Merged

[MRG] remove identical assert in test_iforest_sparse#9112
agramfort merged 1 commit intoscikit-learn:masterfrom
albertcthomas:sc_test_iforest

Conversation

@albertcthomas
Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

This removes identical lines in test_iforest_sparse function: assert_array_equal(sparse_results, dense_results).

sparse_classifier = IsolationForest(
    n_estimators=10, random_state=1, **params).fit(X_train_sparse)
sparse_results = sparse_classifier.predict(X_test_sparse)

dense_classifier = IsolationForest(
    n_estimators=10, random_state=1, **params).fit(X_train)
dense_results = dense_classifier.predict(X_test)

assert_array_equal(sparse_results, dense_results)
assert_array_equal(sparse_results, dense_results)

Any other comments?

Given the context of the test I don't think that the removed line was supposed to test something different than the line above.

@jnothman
Copy link
Copy Markdown
Member

Thanks

@jnothman jnothman closed this Jun 12, 2017
@albertcthomas
Copy link
Copy Markdown
Contributor Author

@jnothman I think you forgot to merge before closing

@agramfort agramfort reopened this Jun 13, 2017
@agramfort agramfort merged commit e07640e into scikit-learn:master Jun 13, 2017
@jnothman
Copy link
Copy Markdown
Member

Haha indeed

@albertcthomas albertcthomas deleted the sc_test_iforest branch June 13, 2017 09:57
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants