Skip to content

Commit

Permalink
updates for predicted survival time
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Jan 15, 2024
1 parent 043f59b commit 2f3e67b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
4 changes: 2 additions & 2 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.1.2
Date: 2024-01-13 19:04:16 UTC
SHA: 633b5a3853072b4bbbd5b63454369e717ace8d7e
Date: 2024-01-14 22:34:29 UTC
SHA: e2720672022846736ccc88d783d0f1a3f382df9a
34 changes: 17 additions & 17 deletions R/orsf_R6.R
Original file line number Diff line number Diff line change
Expand Up @@ -3059,17 +3059,17 @@ ObliqueForest <- R6::R6Class(
sample_with_replacement = .dots$sample_with_replacement %||% self$sample_with_replacement,
sample_fraction = .dots$sample_fraction %||% self$sample_fraction,
vi_type_R = switch(.dots$importance_type %||% self$importance_type,
"none" = 0,
"negate" = 1,
"none" = 0,
"negate" = 1,
"permute" = 2,
"anova" = 3),
"anova" = 3),
vi_max_pvalue = .dots$importance_max_pvalue %||% self$importance_max_pvalue,
leaf_min_events = .dots$leaf_min_events %||% self$leaf_min_events %||% 1,
leaf_min_obs = .dots$leaf_min_obs %||% self$leaf_min_obs,
split_rule_R = switch(self$split_rule,
"logrank" = 1,
"cstat" = 2,
"gini" = 3,
"logrank" = 1,
"cstat" = 2,
"gini" = 3,
"variance" = 4),
split_min_events = .dots$split_min_events %||% self$split_min_events %||% 1,
split_min_obs = .dots$split_min_obs %||% self$split_min_obs,
Expand All @@ -3078,9 +3078,9 @@ ObliqueForest <- R6::R6Class(
split_max_retry = .dots$split_max_retry %||% self$n_retry,
lincomb_R_function = self$control$lincomb_R_function,
lincomb_type_R = switch(self$control$lincomb_type,
'glm' = 1,
'glm' = 1,
'random' = 2,
'net' = 3,
'net' = 3,
'custom' = 4),
lincomb_eps = self$control$lincomb_eps,
lincomb_iter_max = self$control$lincomb_iter_max,
Expand All @@ -3091,16 +3091,16 @@ ObliqueForest <- R6::R6Class(
'breslow' = 0,
'efron' = 1),
pred_type_R = switch(.dots$pred_type %||% self$pred_type,
"none" = 0,
"risk" = 1,
"surv" = 2,
"chf" = 3,
"mort" = 4,
"mean" = 5,
"prob" = 6,
"none" = 0,
"risk" = 1,
"surv" = 2,
"chf" = 3,
"mort" = 4,
"mean" = 5,
"prob" = 6,
"class" = 7,
"leaf" = 8,
"time" = 9),
"leaf" = 8,
"time" = 9),
pred_mode = .dots$pred_mode %||% FALSE,
pred_aggregate = .dots$pred_aggregate %||% (self$pred_type != 'leaf'),
pred_horizon = .dots$pred_horizon %||% self$pred_horizon %||% 1,
Expand Down
6 changes: 4 additions & 2 deletions R/orsf_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ print.orsf_summary_uni <- function(x, n_variables = NULL, ...){
pred_label <- switch(
x$pred_type,
'risk' = 'Risk',
'surv' = 'Survival',
'surv' = 'Survival probability',
'chf' = 'Cumulative hazard',
'mort' = 'Mortality',
'prob' = "Probability"
'prob' = "Probability",
"time" = "Survival time",
"mean" = "Expected value"
)

extra_surv_text <- ""
Expand Down
38 changes: 19 additions & 19 deletions man/orsf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f3e67b

Please sign in to comment.