Skip to content

Commit 0e49f78

Browse files
topepo‘topepo’hfrick
authored
add missing glmnet method for proportional hazard models (#1086)
* add missing glmnet method * Update NEWS.md Co-authored-by: Hannah Frick <[email protected]> --------- Co-authored-by: ‘topepo’ <‘[email protected]’> Co-authored-by: Hannah Frick <[email protected]>
1 parent baec9a4 commit 0e49f78

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ S3method(set_engine,model_spec)
9999
S3method(set_mode,default)
100100
S3method(set_mode,model_spec)
101101
S3method(tidy,"_LiblineaR")
102+
S3method(tidy,"_coxnet")
102103
S3method(tidy,"_elnet")
103104
S3method(tidy,"_fishnet")
104105
S3method(tidy,"_lognet")

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# parsnip (development version)
22

3+
* Added a missing `tidy()` method for survival analysis glmnet models (#1086).
4+
35
# parsnip 1.2.0
46

57
## Bug Fixes

R/tidy_glmnet.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ tidy._fishnet <- function(x, penalty = NULL, ...) {
3232
tidy_glmnet(x, penalty)
3333
}
3434

35+
#' @export
36+
#' @rdname tidy._elnet
37+
tidy._coxnet <- function(x, penalty = NULL, ...) {
38+
tidy_glmnet(x, penalty)
39+
}
40+
3541
## -----------------------------------------------------------------------------
3642

3743
get_glmn_coefs <- function(x, penalty = 0.01) {

man/tidy._elnet.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)