Comments (5)
We now have a good approach for this and the resampling methods are working as intended. Big thanks to @be-marc!
We'll soon update the README and the book with usage examples.
from mlr3spatiotempcv.
I don't know spatio-temporal stats very well. But you can mark columns to be treated specially. I've pushed a small example where two columns (x+y) are marked as coordinates by assigning them a special col_role
. I assume they still count as feature?
Maybe you can look into the example script and then we do a call to discuss what is missing in mlr3.
from mlr3spatiotempcv.
Not sure if this is a good idea, since I have not had a look into the inner world of the mlr-verse but wouldn't it be an idea to just use the geometry-column of sf-objects (of the point type) as basis for the spatial resampling? This would have the additional benefit of sparing the user from providing an additional xy-data.frame
. For the modeling-resampling stuff, we could just set the geometry column to NULL
which again would be nice since this way we would force the user to provide spatial coordinates as predictors if he/she must use them.
from mlr3spatiotempcv.
But you can mark columns to be treated specially. I've pushed a small example where two columns (x+y) are marked as coordinates by assigning them a special col_role. I assume they still count as feature?
Usually they do not, even though some people use it (with some arguments in favor) and therefore it should be allowed if they are explicitly in the DF.
However, as @jannes-m pointed out, we should have a "fool-safe" method to supply the coordinates next to the actucal predictors. Otherwise people will just put it in the DF and have no clue how that might affect the model fitting (this happens really often).
Since the sf pkg is used for pretty much any spatial analysis in R, depending on it wouldn't be so problemati from my point of view, even though it has a huge dep chain.
We would have to see how this interacts with all the data.table stuff in mlr3, however, as coercing to sf usually inhertics only classes data.frame
and 'sf` but not data.table. Coercing back and forth would be tedious.
Maybe there is a way we can get it done. Would also be helpful for the plotting functions.
One option could be to force the user to supply a sf DF as the task which will be coerced to a data.table after we extracted the coords internally?
from mlr3spatiotempcv.
and @jannes-m Due to the R6 class system, the idea is that after the extension pkg mlr3spatiotemporal gets loaded, the base classes are extended by specific methods of this pkg.
It should be possible to do both when the pkg is loaded and not be restricted to spatial stuff by forcing sf objects as task DFs. Mhh, this somehow contradicts my thought from above. Let's discuss this in more detail f2f.
from mlr3spatiotempcv.
Related Issues (20)
- Check out `spcosa` package
- spatial resampling for train and test set in computer vision cases HOT 1
- Loading mlr3spatiotempcv prevents pipelines with target variable transformations from making predictions HOT 2
- New SpCV method Zalazar et al.
- Handling of `sf` objects WRT `DataBackends` HOT 2
- Longterm play of Task*ST and DataBackends HOT 1
- `as_task_*_st` and friends could allow setting column roles directly HOT 2
- Update method help pages HOT 1
- as.data.table(mlr_resamplings) does not work without suggested packages
- Add label and man field to resamplings
- Clarify the use of column roles for grouping features HOT 2
- Task printer should show `time` and `space` column roles
- Log message during `private$sample()` when column roles "space" and "time" are set HOT 1
- sf object no longer accepted by TaskClassifST HOT 1
- CRAN 2.0.1 version produces bug when registering `sf` objects as spatial backend for `TaskClassifST` HOT 3
- `register_mlr3` fails due to non-matching columns HOT 1
- cleanup when unloading HOT 1
- Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools** HOT 1
- Failure with the new version of **blockCV** HOT 5
- linnenbrink2023 reference broken in mlr3spatiotempcv vignette HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlr3spatiotempcv.