Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in eco chapter #1118

Closed
Robinlovelace opened this issue Sep 24, 2024 · 3 comments
Closed

Error in eco chapter #1118

Robinlovelace opened this issue Sep 24, 2024 · 3 comments

Comments

@Robinlovelace
Copy link
Collaborator

62/70 [15-eco-27]        
Error in `.__AutoTuner__validate()`:
! could not find function ".__AutoTuner__validate"
Backtrace:
  1. base::eval(...)
  2. base::eval(...)
  4. rmarkdown (local) `<fn>`(...)
  5. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  6. knitr:::process_file(text, output)
     ...
 17. base::withRestarts(...)
 18. base (local) withRestartList(expr, restarts)
 19. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 20. base (local) docall(restart$handler, restartArgs)
 22. evaluate (local) fun(base::quote(`<smplErrr>`))
Warning messages:
1: In warn_deprecated("Task$data_formats") :
  Task$data_formats is deprecated and will be removed in the future.
2: In warn_deprecated("DataBackend$data_formats") :
  DataBackend$data_formats is deprecated and will be removed in the future.
3: In warn_deprecated("Learner$data_formats") :
  Learner$data_formats is deprecated and will be removed in the future.

Source: https://github.com/geocompx/geocompr/actions/runs/11008562689/job/30566434904#step:4:2823

Any ideas @jannes-m or @Nowosad ?

@Robinlovelace
Copy link
Collaborator Author

All these lines seem to be failing, I'm trying to re-run them:

geocompr/15-eco.Rmd

Lines 508 to 534 in 5855dea

```{r 15-eco-24, eval=FALSE, cache=TRUE, cache.lazy=FALSE}
# hyperparameter tuning
set.seed(08012024)
autotuner_rf$train(task)
```
```{r 15-eco-25, cache=TRUE, cache.lazy=FALSE, eval=FALSE, echo=FALSE}
saveRDS(autotuner_rf, "extdata/15-tune.rds")
```
```{r 15-eco-26, echo=FALSE, cache=TRUE, cache.lazy=FALSE}
autotuner_rf = readRDS("extdata/15-tune.rds")
```
```{r tuning-result, cache=TRUE, cache.lazy=FALSE}
autotuner_rf$tuning_result
```
### Predictive mapping
The tuned hyperparameters\index{hyperparameter} can now be used for the prediction.
To do so, we only need to run the `predict` method of our fitted `AutoTuner` object.
```{r 15-eco-27, cache=TRUE, cache.lazy=FALSE, warning=FALSE}
# predicting using the best hyperparameter combination
autotuner_rf$predict(task)
```

@Robinlovelace
Copy link
Collaborator Author

Attempted fix: 737cbfc

@Robinlovelace Robinlovelace changed the title Error in econ chapter Error in eco chapter Sep 24, 2024
@jannes-m
Copy link
Collaborator

closed via #1124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants