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

Region-k-means seed #294

Merged
merged 7 commits into from
Nov 3, 2022
Merged

Region-k-means seed #294

merged 7 commits into from
Nov 3, 2022

Conversation

jGaboardi
Copy link
Member

@jGaboardi jGaboardi commented Oct 30, 2022

Resolves #213.

After more digging I found that we were not providing the functionality of actually passing in a seed value to the base._seeds() function. Therefore, the resultant numpy.random.choice() function within could never be reproduced and was screwing tests up.

This PR also:

@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Merging #294 (6d44416) into main (de63bf2) will increase coverage by 0.3%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #294     +/-   ##
=======================================
+ Coverage   72.9%   73.2%   +0.3%     
=======================================
  Files         23      23             
  Lines       2402    2402             
  Branches     460     459      -1     
=======================================
+ Hits        1750    1758      +8     
+ Misses       584     580      -4     
+ Partials      68      64      -4     
Impacted Files Coverage Δ
spopt/region/maxp.py 94.7% <ø> (ø)
spopt/region/base.py 97.6% <100.0%> (+6.4%) ⬆️
spopt/region/region_k_means.py 98.7% <100.0%> (+<0.1%) ⬆️

@jGaboardi
Copy link
Member Author

@sjsrey @knaaptime gently pining for review (when time permits).

Copy link
Member

@sjsrey sjsrey left a comment

Choose a reason for hiding this comment

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

The seed stuff looks good. Just one question related to RegionMixin that I left.

spopt/region/base.py Outdated Show resolved Hide resolved
@jGaboardi
Copy link
Member Author

converted #297 to a discussion (#298)

Copy link
Member

@sjsrey sjsrey left a comment

Choose a reason for hiding this comment

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

Thanks for spotting the lack of use of RegionMixin

@jGaboardi jGaboardi merged commit 470eb86 into pysal:main Nov 3, 2022
@jGaboardi jGaboardi deleted the regkmeans_seed branch November 3, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

K means heuristic test failure
2 participants