scvi.model.get_max_epochs_heuristic#
- scvi.model.get_max_epochs_heuristic(n_obs, epochs_cap=400, decay_at_n_obs=20000)[source]#
Compute a heuristic for the default number of maximum epochs.
If
n_obs <= decay_at_n_obs
, the number of maximum epochs is set toepochs_cap
. Otherwise, the number of maximum epochs decays according to(decay_at_n_obs / n_obs) * epochs_cap
, with a minimum of 1. Raises a warning if the number of maximum epochs is set to 1.- Parameters:
- Return type:
- Returns:
A heuristic for the number of maximum training epochs.