Comments (3)
Works fine for me. Did you update all packages? You were still using spcv-coords
in your example whereas the CRAN version uses underscores - hence I assume you are on an oudated version.
Using the {reprex} package also helps checking for issues.
library("mlr3")
library("mlr3spatiotempcv")
library("mlr3tuning")
library("paradox")
task <- tsk("ecuador")
learner <- lrn("classif.rpart", predict_type = "prob")
# tune hyperparameter cp
param_set <- ps(cp = p_dbl(lower = -5, upper = 0, trafo = function(x) 10^x))
# AUROC suitable for binary classification tasks
measure <- msr("classif.auc")
# 10 evaluations
terminator <- trm("evals", n_evals = 10)
# random search: best balance between computation time and search space grazing
tuner <- tnr("random_search")
# inner resampling method
tuning_resampling <- rsmp("spcv_coords", folds = 10)
# tuning_resampling$instantiate(task)
instance <- TuningInstanceSingleCrit$new(
task = task,
learner = learner,
resampling = tuning_resampling,
measure = measure,
search_space = param_set,
terminator = terminator
)
Created on 2021-02-12 by the reprex package (v1.0.0)
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.0.3 (2020-10-10)
#> os macOS Big Sur 10.16
#> system x86_64, darwin17.0
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Zurich
#> date 2021-02-12
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib
#> assertthat 0.2.1 2019-03-21 [1]
#> backports 1.2.1 2020-12-09 [1]
#> bbotk 0.3.0 2021-01-24 [1]
#> checkmate 2.0.0 2020-02-06 [1]
#> cli 2.3.0 2021-01-31 [1]
#> colorspace 2.0-0 2020-11-11 [1]
#> crayon 1.4.1 2021-02-08 [1]
#> data.table 1.13.6 2020-12-30 [1]
#> DBI 1.1.1 2021-01-15 [1]
#> digest 0.6.27 2020-10-24 [1]
#> dplyr 1.0.4 2021-02-02 [1]
#> ellipsis 0.3.1 2020-05-15 [1]
#> evaluate 0.14 2019-05-28 [1]
#> fs 1.5.0 2020-07-31 [1]
#> generics 0.1.0 2020-10-31 [1]
#> ggplot2 3.3.3 2020-12-30 [1]
#> glue 1.4.2 2020-08-27 [1]
#> gtable 0.3.0 2019-03-25 [1]
#> highr 0.8 2019-03-20 [1]
#> htmltools 0.5.1.1 2021-01-22 [1]
#> knitr 1.31 2021-01-27 [1]
#> lgr 0.4.2 2021-01-10 [1]
#> lifecycle 0.2.0 2020-03-06 [1]
#> magrittr 2.0.1 2020-11-17 [1]
#> mlr3 * 0.10.0 2021-01-21 [1]
#> mlr3measures 0.3.1 2021-01-06 [1]
#> mlr3misc 0.7.0 2021-01-05 [1]
#> mlr3spatiotempcv * 0.1.1.9000 2021-01-30 [1]
#> mlr3tuning * 0.6.0 2021-01-24 [1]
#> munsell 0.5.0 2018-06-12 [1]
#> paradox * 0.7.0 2021-01-23 [1]
#> pillar 1.4.7 2020-11-20 [1]
#> pkgconfig 2.0.3 2019-09-22 [1]
#> purrr 0.3.4 2020-04-17 [1]
#> R.cache 0.14.0 2019-12-06 [1]
#> R.methodsS3 1.8.1 2020-08-26 [1]
#> R.oo 1.24.0 2020-08-26 [1]
#> R.utils 2.10.1 2020-08-26 [1]
#> R6 2.5.0 2020-10-28 [1]
#> rematch2 2.1.2 2020-05-01 [1]
#> reprex 1.0.0 2021-01-27 [1]
#> rlang 0.4.10 2020-12-30 [1]
#> rmarkdown 2.6.6 2021-02-10 [1]
#> scales 1.1.1 2020-05-11 [1]
#> sessioninfo 1.1.1 2018-11-05 [1]
#> stringi 1.5.3 2020-09-09 [1]
#> stringr 1.4.0 2019-02-10 [1]
#> styler 1.3.2.9000 2020-10-19 [1]
#> tibble 3.0.6 2021-01-29 [1]
#> tidyselect 1.1.0 2020-05-11 [1]
#> uuid 0.1-4 2020-02-26 [1]
#> vctrs 0.3.6 2020-12-17 [1]
#> withr 2.4.1 2021-01-26 [1]
#> xfun 0.21 2021-02-10 [1]
#> yaml 2.2.1 2020-02-01 [1]
#> source
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.4)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> Github (mlr-org/mlr3spatiotempcv@8f0d554)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> Github (rstudio/rmarkdown@a62cb20)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> Github (pat-s/styler@51d5200)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.3)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.2)
#> CRAN (R 4.0.4)
#> CRAN (R 4.0.3)
#>
#> [1] /Users/pjs/Library/R/4.0/library
#> [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library
from mlr3spatiotempcv.
Alright, that's it, thanks! Now working flawlessly.
from mlr3spatiotempcv.
Great! Feel free to close your issues in the future 👍
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.