Skip to content

Commit

Permalink
10x speedup because earth does cv for no reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsvanderlaan committed Jan 6, 2023
1 parent 85b87fa commit afc4d66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/screening.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ fit_earth_hal <- function(X,
#' screen_MARS(X, Y, degree = 1)
#'
screen_MARS <- function(x, y, pmethod = "cv", degree = 2, nfold = 10, fast.k = NULL, nk = NULL, glm = list(family = gaussian()), weights = NULL) {
if(pmethod != "cv") {
nfold <- 0

Check warning on line 402 in R/screening.R

View check run for this annotation

Codecov / codecov/patch

R/screening.R#L402

Added line #L402 was not covered by tests
}
X <- x
Y <- y
n <- length(Y)
Expand Down

0 comments on commit afc4d66

Please sign in to comment.