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

Bug in stratified_sample function #19

Open
BuddyVolly opened this issue Jan 28, 2020 · 0 comments
Open

Bug in stratified_sample function #19

BuddyVolly opened this issue Jan 28, 2020 · 0 comments

Comments

@BuddyVolly
Copy link

Dear Perrygeo,

to me it seems there is a bug in line 267 in _main.py. You use the index over the index_array for the strata. Later, in the load_training_raster function, you apply directly the idx over your response data, so that it actually points to different data points that were selected by the stratification, and the actual sampling is not stratified as it should (you might even miss out some classes).

Therefore line 267 should be:

stratum = strata[idx]

Best,
BV

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

No branches or pull requests

1 participant