View source: R/hsa_sample_constrained.R
| hsa_sample_constrained | R Documentation |
Conduct a constrained sensitivity analysis on a hespdiv object by
repeatedly subsampling observations within each polygon. Each subsample
is used to call hespdiv with recursion disabled (i.e., single-split only).
hsa_sample_constrained(
obj,
n.runs = 100,
subsample_factor = 0.7,
RAM = NULL,
load_prop = NULL,
chunk_size = 8,
workers = NULL
)
obj |
A |
n.runs |
Integer. The number of subsampling runs to perform (default: 100). |
subsample_factor |
Numeric proportion of data to subsample within each polygon (0 to 1]. For example, 0.7 means 70% of the data in each polygon are retained. |
RAM |
Integer. Approximate amount of RAM in GB to guide how many parallel
workers to use. The function uses up to 80\
but also caps the number of workers at |
load_prop |
Numeric value (0,1]. Specifies the proportion of available
CPU cores or RAM to be used for setting up parallel workers. For example,
|
chunk_size |
Integer. Number of runs submitted per batch. Parallelism is
controlled by |
workers |
A number of parrallel workers. Determines the number of hespdiv runs to be processed in parallel. |
For each polygon in the hespdiv object, this function draws subsample_factor
of the data (by default 70%), creating multiple random subsamples (n.runs).
These are processed in chunks (as given by chunk_size) and runs in each chunk being
parallelized to manage memory usage.
A hsa_constrained class object, a list with two elements:
Alternatives
A named list corresponding to each polygon where each entry is another
list of hespdiv results for each subsample run.
Basis
The original hespdiv object (obj).
hespdiv for details on the main function.
future.apply
Other functions for hespdiv sensitivity analysis:
change_base(),
hsa(),
hsa_detailed(),
hsa_quant(),
plot_cs_hsa(),
plot_hsa(),
plot_hsa_q()
Other functions for hespdiv results post-processing:
cross_comp(),
hsa(),
hsa_detailed(),
hsa_quant(),
nulltest(),
taxon_effect()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.