View source: R/flash_set_timeout.R
flash_set_timeout | R Documentation |
Used in a flash
pipeline to set a maximum amount of fitting
time. Note that timeout conditions are only checked during greedy fits
and backfits, so that the total amount of fitting time can exceed the time
set by flash_set_timeout
(especially if, for example, there is a
nullcheck involving many factor/loading pairs). Also note that timeout
conditions must be cleared using function flash_clear_timeout
before any re-fitting is attempted.
flash_set_timeout(
flash,
tim,
units = c("hours", "secs", "mins", "days", "weeks")
)
flash |
A |
tim |
A numeric value giving the maximum amount of fitting time, with
the units of time specified by parameter |
units |
The units of time according to which parameter |
The flash
object from argument flash
, with the
timeout settings reflected in updates to the "internal" flash_fit
object. These settings will persist across all subsequent calls to
flash_xxx
functions until they are modified either by
flash_clear_timeout
or by another call to
flash_set_timeout
.
fl <- flash_init(gtex) %>%
flash_set_timeout(1, "secs") %>%
flash_greedy(Kmax = 30) %>%
flash_backfit() %>%
flash_nullcheck() %>%
flash_clear_timeout() # Always clear timeout at the end of a pipeline.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.