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

set_seed

Set seed in R numpy and torch


Description

To ensure consistent results, a seed has to be set in R using set.seed as usual but also in numpy and torch via reticulate. Therefore this function simplifies the process into one funciton.

Usage

set_seed(seed_R, seed_np = seed_R, seed_torch = seed_R)

Arguments

seed_R

(integer(1)) seed passed to set.seed.

seed_np

(integer(1)) seed passed to numpy$random$seed. Default is same as seed_R.

seed_torch

(integer(1)) seed passed to numpy$random$seed. Default is same as seed_R.


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.