simulate_random_gradients | R Documentation |
This function simulates random expression patterns, computes gradients, and calculates various metrics for evaluating the inferred expression gradients.
simulate_random_gradients(
coords_df,
span,
expr_est_pos,
amccd,
n = 1000,
seed = 123,
coef = Inf,
range = c(0, 1),
control = SPATA2::sgs_loess_control,
fn = "runif",
verbose = TRUE,
...
)
coords_df |
A data frame containing coordinates and distance information. |
span |
The alpha parameter for the loess smoothing, controlling the degree of smoothness. |
n |
The number of simulations to perform (default is 1000). |
seed |
The random seed to ensure reproducibility (default is 123). |
range |
A numeric vector specifying the range for generating random expression values (default is c(0, 1)). |
verbose |
A logical value indicating whether to display progress messages (default is TRUE). |
... |
Additional parameters given to |
pred_pos |
A numeric vector of positions for which the gradients are inferred. |
A list of length n
containing information about the simulated gradients, Loess Deviation Scores (LDS),
loess models, and total variation for each simulation. The list is named with seed indices to trace the circumstances
under which each simulation was conducted.
The output list contains the following components:
A numeric vector representing the inferred expression gradient.
A loess model object fitted to the simulated data.
A numeric value representing the total variation of the inferred gradient.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.