Skip to content

Bug in stratified_sample function #19

@BuddyVolly

Description

@BuddyVolly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions