Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get_pycox_callbacks

Get Torchtuples Callbacks


Description

Helper function to return torchtuples callbacks from torchtuples.callbacks.

Usage

get_pycox_callbacks(
  early_stopping = FALSE,
  best_weights = FALSE,
  min_delta = 0,
  patience = 10L
)

Arguments

early_stopping

(logical(1))
If TRUE then constructs torchtuples.callbacks,EarlyStopping.

best_weights

(logical(1))
If TRUE then returns torchtuples.callbacks.BestWeights. Ignored if early_stopping is TRUE.

min_delta

(numeric(1))
Passed to torchtuples.callbacks.EarlyStopping.

patience

(integer(1))
Passed to torchtuples.callbacks.EarlyStopping.

Examples

if (requireNamespaces("reticulate")) {
  get_pycox_callbacks(early_stopping = TRUE)

  get_pycox_callbacks(best_weights = TRUE)
}

survivalmodels

Models for Survival Analysis

v0.1.11
MIT + file LICENSE
Authors
Raphael Sonabend [aut, cre] (<https://orcid.org/0000-0001-9225-4654>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.