Giter Site home page Giter Site logo

Comments (5)

pat-s avatar pat-s commented on May 23, 2024 1

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.

mllg avatar mllg commented on May 23, 2024

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.

jannes-m avatar jannes-m commented on May 23, 2024

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.

pat-s avatar pat-s commented on May 23, 2024

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.

pat-s avatar pat-s commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.