The algorithm uses the high-dimensional arf model to generate synthetic data
Arguments
- harf_obj
A pre-trained harf model.
- n_synth
Number of synthetic samples to generate.
- evidence
Optional set of conditioning events. This will be further passed to the
fordefunction in each isolated regions. Seefordefor details.- omx_onset_data
Optional data.frame of conditional onset omics features.
- evidence_row_mode
Interpretation of rows in multi-row evidence. See
fordefor details.- round
Round continuous variables to their respective maximum precision in the real data set? See
fordefor details.- sample_NAs
Sample NAs respecting the probability for missing values in the original data? See
fordefor details.- nomatch
What to do if no leaf matches a condition in evidence? Options are to force sampling from a random leaf ("force") or return NA ("na"). The default is "force".
- verbose
What to do if no leaf matches a condition in
evidence? Seefordefor details.- stepsize
How many rows of evidence should be handled at each step? See
fordefor details.- parallel
Compute in parallel? See
fordefor details.
See also
forge for details on the forging process.
Examples
if (FALSE) { # \dontrun{
data(single_cell)
harf_model <- h_arf(
omx_data = single_cell[ , - which(colnames(single_cell) == "cell_type")],
cli_lab_data = data.frame(cell_type = single_cell$cell_type)
)
# Unconditional sampling from harf_model
set.seed(123)
synth_single_cell <- h_forge(
harf_obj = harf_model,
n_synth = nrow(single_cell)
)
# Conditional resampling from harf_model
set.seed(142)
lung_single_cell <- h_forge(
harf_obj = harf_model,
n_synth = sum(single_cell$cell_type == "lung"),
evidence = data.frame(cell_type = "lung")
)
} # }