-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG] FIX/TST boundary cases in dbscan #4073
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
Conversation
@@ -174,6 +175,17 @@ def test_pickle(): | |||
assert_equal(type(pickle.loads(s)), obj.__class__) | |||
|
|||
|
|||
def test_bounaries(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: boundaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
aec25bb
to
495c146
Compare
This should now be testable, right? |
495c146
to
cdb0577
Compare
Rather the tests were written elsewhere with a different patch. This is now rebased and ready for review. |
the case with no core samples fails... |
Of course I reviewed #4052, but what basis did we have for thinking
I've made that test more certain. |
Sorry, that was a hacky test. It probably came from some example that was failing at the time. |
core, _ = dbscan([[0], [1]], eps=2, min_samples=2) | ||
assert_in(0, core) | ||
# ensure eps is inclusive of circumference | ||
core, _ = dbscan([[0], [1], [1]], eps=1, min_samples=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a stupid question but why do you need [1] twice?
* tag '0.16b1': (1589 commits) 0.16.X branching, version 0.16b1 Fix scikit-learn#4351. Rendering of docs in MinMaxScaler. Fix rebase conflict MAINT use canonical PEP-440 dev version consistently Adding fix for issue scikit-learn#4297, isotonic infinite loop DOC deprecate random_state for DBSCAN FIX/TST boundary cases in dbscan (closes scikit-learn#4073) Do not shuffle in DBSCAN (warn if `random_state` is used). Update docstring predict_proba() Update documentation of predict_proba in tree module add scipy2013 tutorial links to presentations on website. TST boundary handling in LSHForest.radius_neighbors ENH improve docstrings and test for radius_neighbors models use a pipeline for pre-processing feature selection, as per best practise DOC remove unnecessary backticks in CONTRIBUTING. ENH no need for tie breaking jitter in calibration Implement "secondary" tie strategy in isotonic. Adding unit test to cover ties/duplicate x values in Isotonic Regression re: issue scikit-learn#4184 MAINT fix typo pyagm -> pygamg in SkipTest STYLE trailing spaces ...
* releases: (1589 commits) 0.16.X branching, version 0.16b1 Fix scikit-learn#4351. Rendering of docs in MinMaxScaler. Fix rebase conflict MAINT use canonical PEP-440 dev version consistently Adding fix for issue scikit-learn#4297, isotonic infinite loop DOC deprecate random_state for DBSCAN FIX/TST boundary cases in dbscan (closes scikit-learn#4073) Do not shuffle in DBSCAN (warn if `random_state` is used). Update docstring predict_proba() Update documentation of predict_proba in tree module add scipy2013 tutorial links to presentations on website. TST boundary handling in LSHForest.radius_neighbors ENH improve docstrings and test for radius_neighbors models use a pipeline for pre-processing feature selection, as per best practise DOC remove unnecessary backticks in CONTRIBUTING. ENH no need for tie breaking jitter in calibration Implement "secondary" tie strategy in isotonic. Adding unit test to cover ties/duplicate x values in Isotonic Regression re: issue scikit-learn#4184 MAINT fix typo pyagm -> pygamg in SkipTest STYLE trailing spaces ... Conflicts: sklearn/externals/joblib/__init__.py sklearn/externals/joblib/numpy_pickle.py sklearn/externals/joblib/parallel.py sklearn/externals/joblib/pool.py
* dfsg: (1589 commits) 0.16.X branching, version 0.16b1 Fix scikit-learn#4351. Rendering of docs in MinMaxScaler. Fix rebase conflict MAINT use canonical PEP-440 dev version consistently Adding fix for issue scikit-learn#4297, isotonic infinite loop DOC deprecate random_state for DBSCAN FIX/TST boundary cases in dbscan (closes scikit-learn#4073) Do not shuffle in DBSCAN (warn if `random_state` is used). Update docstring predict_proba() Update documentation of predict_proba in tree module add scipy2013 tutorial links to presentations on website. TST boundary handling in LSHForest.radius_neighbors ENH improve docstrings and test for radius_neighbors models use a pipeline for pre-processing feature selection, as per best practise DOC remove unnecessary backticks in CONTRIBUTING. ENH no need for tie breaking jitter in calibration Implement "secondary" tie strategy in isotonic. Adding unit test to cover ties/duplicate x values in Isotonic Regression re: issue scikit-learn#4184 MAINT fix typo pyagm -> pygamg in SkipTest STYLE trailing spaces ...
#3994 handled the
min_samples
boundary case differently to the prior DBSCAN implementation. This is now clarified in the docs. Unfortunately, when properly testing boundary cases, I found the inconsistency reported at #4072. I fix it here for 'brute' search without tests, pending a complete patch for #4072.