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

Adds support for flexsurvspline engine for survival_reg model spec #831

Merged
merged 13 commits into from
Nov 3, 2022
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export(svm_rbf)
export(tidy)
export(translate)
export(translate.default)
export(tunable.survival_reg)
export(tune)
export(update_dot_check)
export(update_engine_parameters)
Expand Down
6 changes: 3 additions & 3 deletions R/tunable.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ brulee_multinomial_engine_args <-

flexsurvspline_engine_args <-
tibble::tibble(
name = c("num_knots"),
name = c("k"),
mattwarkentin marked this conversation as resolved.
Show resolved Hide resolved
call_info = list(
list(pkg = "dials", fun = "num_knots")
),
Expand Down Expand Up @@ -321,8 +321,8 @@ tunable_mlp <- function(x, ...) {
res
}

# Lazily registered in .onLoad()
tunable_survival_reg <- function(x, ...) {
#' @export
tunable.survival_reg <- function(x, ...) {
res <- NextMethod()
if (x$engine == "flexsurvspline") {
res <- add_engine_parameters(res, flexsurvspline_engine_args)
Expand Down