Description Usage Arguments Value Examples
View source: R/package_contents.R
Estimate Site Gradient
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | estimate_site_gradient(
model_name,
synced_folder,
site_name = "site1",
data,
all_site_names = NULL,
shuffle_rows = TRUE,
experimental = FALSE
)
estimate_model(
model_name,
synced_folder,
site_name = "site1",
data,
all_site_names = NULL,
shuffle_rows = TRUE,
wait_time = 1,
run_compute = FALSE,
experimental = FALSE
)
|
model_name |
name of your model |
synced_folder |
synced folder to do computation |
site_name |
name of the site, needs to be one of the
|
data |
dataset to get gradient value from |
all_site_names |
all the site names used to fit this model |
shuffle_rows |
should the rows of the dataset be permuted, so as to decrease privacy concerns |
experimental |
using the |
wait_time |
Time, in seconds, to wait until to try to get new estimate |
run_compute |
if |
A character filename of the gradient file, with the
output from gradient_value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data = data.frame(y = c(0, 0, 1),
pois_y = c(4, 1, 0),
x2 = c(-2.19021287072066,
-0.344307138450805, 3.47215796952745),
x1 = c(-0.263859503846267,
-0.985160029707486, 0.227262373184513))
tdir = tempfile()
dir.create(tdir)
model_name = "logistic_example"
form_file = setup_model(model_name = model_name,
synced_folder = tdir,
formula = "y ~ x1 + x2", family = "binomial")
outfile = estimate_site_gradient(
model_name = model_name, synced_folder = tdir,
all_site_names = "site1",
data = data)
clear_model(model_name, tdir)
testthat::expect_error({
outfile = estimate_site_gradient(
model_name = model_name, synced_folder = tdir,
all_site_names = "site1",
data = data)
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.