-
Hi @leouieda, I came across this interesting tool and wanted to use some of the functions in this package for my master thesis for handling spatial data. I would like to ask two questions: The first question that I would like to ask is about the train_test_split with spacing and the cross validation (BlockKFold and cross_val_score) functions. I have read the documentation and source code but could not find a direct approach to the following:
In the documentation examples I only see that the coordinates = X (two coordinate variables) and data = y (one target variable). The second question that I would like to ask is about the coordinates input type. The dataset that I am using has:
Thank you for your advice and help. Kind regards, A.Azzam |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
👋🏾 Hi @AAzzam91 thanks for asking this! I'm going to transfer this to our Forum instead since it's more of a questions. You don't have to do anything and should get automatically redirected there. |
Beta Was this translation helpful? Give feedback.
-
That was a bit of an oversight on my part. It should be possible to make Making it more flexible would mean remove that restriction and passing an argument to tell the class which features are the coordinates used for blocking. This is an interesting idea and I opened this issue to keep track of progress on that: fatiando/verde#398 Thanks!
The Verde block CV is a bit more limited in terms of scope and is mostly meant for point data. Handling geometries gets into things like geopandas and a bit outside of our expertise. While that's a great use case, it would be a bit outside the scope of what we could do in a single package. So the answer here is "no". Only points such as x, y or lon, lat are allowed. But this may be doable or maybe in scope for the Sorry that this may not be a satisfying answer but I hope it gives you some ideas to move forward 🙂 |
Beta Was this translation helpful? Give feedback.
That was a bit of an oversight on my part. It should be possible to make
verde.BlockKFold
more flexible so that it can takeX
with more than 2 features. Right now that doesn't work because of this line: https://github.com/fatiando/verde/blob/main/verde/base/base_classes.py#L81Making it more flexible would mean remove that restriction and passing an argument to tell the class which features are the coordinates used for blocking. This is an interesting idea and I opened this issue to keep track of progress on that: fatiando/verde#398 Thanks!