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

Allow block cross-validation classes to take extra coordinates #398

Open
leouieda opened this issue Nov 30, 2022 · 0 comments
Open

Allow block cross-validation classes to take extra coordinates #398

leouieda opened this issue Nov 30, 2022 · 0 comments
Labels
enhancement Idea or request for a new feature

Comments

@leouieda
Copy link
Member

Description of the desired feature:

Sometimes, we may want to pass extra variables to be split (like heights or other numerical/categorical values) to be split by BlockKFold and BlockShuffleSplit (see fatiando/community#86). Right now, there are two things blocking this:

  1. The BaseBlockCrossValidator checks for 2 dimensions on X: https://github.com/fatiando/verde/blob/main/verde/base/base_classes.py#L81
  2. The cross-validators assume easting=X[:,0] and northing=X[:,1]: https://github.com/fatiando/verde/blob/main/verde/model_selection.py#L184

A solution would be to:

  1. Remove the check in the base class.
  2. Pass in an argument coordinate_columns=[0, 1] that specifies which columns of the feature matrix X correspond to the coordinates.

I think the rest should work and make these classes more usable to general spatial machine learning.

Are you willing to help implement and maintain this feature?

Maybe but I have no bandwidth for this right now and don't really have a use for it just yet. Happy for anyone else to give it a shot.

@leouieda leouieda added the enhancement Idea or request for a new feature label Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant