Skip to content

Commit f928323

Browse files
authored
load_libs() with engine == "earth" (#913)
1 parent 9c42ed4 commit f928323

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
* `.organize_glmnet_pred()` now expects predictions for a single penalty value (#876).
88

9+
* Fixed bug where model fits with `engine = "earth"` would fail when the package's namespace hadn't been attached (#251).
10+
911
* Fixed bug with prediction from a boosted tree model fitted with `"xgboost"` using a custom objective function (#875).
1012

1113
* Several internal functions (to help work with `Surv` objects) were added as a standalone file that can be used in other packages via `usethis::use_standalone("tidymodels/parsnip")`.

R/mars.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ translate.mars <- function(x, engine = x$engine, ...) {
8686
message("Used `engine = 'earth'` for translation.")
8787
engine <- "earth"
8888
}
89+
if (engine == "earth") {
90+
load_libs(x, quiet = TRUE, attach = TRUE)
91+
}
8992
# If classification is being done, the `glm` options should be used. Check to
9093
# see if it is there and, if not, add the default value.
9194
if (x$mode == "classification") {

0 commit comments

Comments
 (0)