Skip to content

Conversation

@glemaitre
Copy link
Member

@glemaitre glemaitre commented Nov 23, 2017

Reference Issue

closes #344
closes: #365

What does this implement/fix? Explain your changes.

Remove the fixed random_seed to compute the hash. Instead we pick-up equally spaced samples.
Since this is related, random_state has been deprecated whenever possible.

TODO:

  • tests

Any other comments?

@glemaitre glemaitre changed the title MAINT make hash deterministic [WIP] MAINT make hash deterministic Nov 23, 2017
@codecov
Copy link

codecov bot commented Nov 23, 2017

Codecov Report

Merging #374 into master will decrease coverage by 0.02%.
The diff coverage is 98.6%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #374 +/- ## ========================================== - Coverage 98.74% 98.71% -0.03%  ========================================== Files 68 68 Lines 3899 3969 +70 ========================================== + Hits 3850 3918 +68  - Misses 49 51 +2
Impacted Files Coverage Δ
imblearn/over_sampling/base.py 100% <ø> (ø) ⬆️
..._sampling/prototype_selection/tests/test_allknn.py 100% <100%> (ø) ⬆️
imblearn/ensemble/balance_cascade.py 100% <100%> (ø) ⬆️
imblearn/over_sampling/random_over_sampler.py 100% <100%> (ø) ⬆️
...prototype_selection/instance_hardness_threshold.py 100% <100%> (ø) ⬆️
...ampling/prototype_selection/tests/test_nearmiss.py 100% <100%> (ø) ⬆️
...prototype_selection/neighbourhood_cleaning_rule.py 100% <100%> (ø) ⬆️
imblearn/utils/validation.py 100% <100%> (ø) ⬆️
...n/tests/test_repeated_edited_nearest_neighbours.py 100% <100%> (ø) ⬆️
...g/prototype_selection/edited_nearest_neighbours.py 100% <100%> (ø) ⬆️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e00e7f8...ea95b50. Read the comment docs.

@glemaitre glemaitre changed the title [WIP] MAINT make hash deterministic [MRG] MAINT make hash deterministic Nov 23, 2017
@glemaitre
Copy link
Member Author

ping @chkoar if you can check this PR. I deprecated in the same time whenever the random_state was not useful.

@glemaitre
Copy link
Member Author

Actually this a blocker to be able to develop what ever new :)

@glemaitre glemaitre merged commit 6fe0e41 into scikit-learn-contrib:master Nov 24, 2017
@chkoar
Copy link
Member

chkoar commented Nov 27, 2017

The changes were trivial and it doesn't matter anymore cause it is merge but I would probably replaced that line

if 'random_state' in sampler_attr: samplers = [Sampler(random_state=0)] else: samplers = [Sampler()]

with this function call :D

@glemaitre
Copy link
Member Author

glemaitre commented Nov 27, 2017 via email

@chkoar
Copy link
Member

chkoar commented Nov 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants