Giter Site home page Giter Site logo

Comments (5)

pat-s avatar pat-s commented on June 16, 2024 1

The data should not matter for this in my view.
You should be able to adapt/copy the test used in test-ResamplingSpCVBuffer.R and replicate it with your own data.

You can see what is being done starting here: https://github.com/mlr-org/mlr3spatiotempcv/blob/main/R/ResamplingSpCVBuffer.R#L119.

The values going into the test can be found here: https://github.com/mlr-org/mlr3spatiotempcv/blob/main/tests/testthat/test-ResamplingSpCVBuffer.R#L57.

from mlr3spatiotempcv.

pat-s avatar pat-s commented on June 16, 2024

Thanks for the info.

Any idea why numbers change with the new update? Does the updated code apply a different sorting of the results? I think it would be easiest if the sorting of the result would stay as before to avoid having to push an update just because of this.

from mlr3spatiotempcv.

rvalavi avatar rvalavi commented on June 16, 2024

@pat-s yeah of course! Could you provide me with your example data so I can diagnose it?

from mlr3spatiotempcv.

rvalavi avatar rvalavi commented on June 16, 2024

@pat-s I checked and here are a few notes:
1- all blocking functions of v2.x still work (and will work for a while to allow appropriate time for adapting the new code), but a new version of them is written with new (general) names
2- there are a few new features such as hexagonal blocks for spatial cv (cv_spatial function) and the newly proposed algorithm, nearest distance distribution matching (Mila et al 2022) is added (cv_nndm); read some of the updates at https://github.com/rvalavi/blockCV#new-updates-of-the-version-30
3- I revert back function spatialBlock to exactly match the previous version to pass mlr3spatiotempcv tests; somehow the data passed to rsmp didn't work with sf::st_is_longlat for the new version of my function.
4- the values in the test (https://github.com/mlr-org/mlr3spatiotempcv/blob/main/tests/testthat/test-ResamplingSpCVBuffer.R#L57.) are the indices and their order shouldn't matter! that's why tests such as expect_equal(rsp$test_set(16), c(22, 16)) failed; I changed the order in my function for now to pass this test; please change these tests to something like: expect_equal(sort(rsp$test_set(16)), c(16, 22)) in future versions.

from mlr3spatiotempcv.

pat-s avatar pat-s commented on June 16, 2024

fixed in #222

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.