Nothing
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
cpp_aghq_make_rclosure_oracle <- function(builder, n_groups, d, n_theta) {
.Call(`_tulpa_cpp_aghq_make_rclosure_oracle`, builder, n_groups, d, n_theta)
}
cpp_aghq_fail_penalty <- function() {
.Call(`_tulpa_cpp_aghq_fail_penalty`)
}
cpp_aghq_objective <- function(par, oracle, nc, full, n_quad, lkj_eta) {
.Call(`_tulpa_cpp_aghq_objective`, par, oracle, nc, full, n_quad, lkj_eta)
}
cpp_aghq_objective_grad <- function(par, oracle, nc, full, n_quad, lkj_eta) {
.Call(`_tulpa_cpp_aghq_objective_grad`, par, oracle, nc, full, n_quad, lkj_eta)
}
cpp_aghq_blups <- function(par, oracle, nc, full) {
.Call(`_tulpa_cpp_aghq_blups`, par, oracle, nc, full)
}
cpp_flatten_3d_rowmajor <- function(arr, d1, d2, d3) {
.Call(`_tulpa_cpp_flatten_3d_rowmajor`, arr, d1, d2, d3)
}
cpp_spde_rational_roots <- function(order, beta, spectrum_ratio, tol = 1e-7) {
.Call(`_tulpa_cpp_spde_rational_roots`, order, beta, spectrum_ratio, tol)
}
cpp_brasil_approx <- function(x, a, b, m, f_exp, tol = 1e-7) {
.Call(`_tulpa_cpp_brasil_approx`, x, a, b, m, f_exp, tol)
}
cpp_cell_coupling_evaluate <- function(name, eta, y, family, phi, n_trials = NULL, cell_idx = 0L, grad_only = FALSE) {
.Call(`_tulpa_cpp_cell_coupling_evaluate`, name, eta, y, family, phi, n_trials, cell_idx, grad_only)
}
cpp_cell_coupling_curvature3 <- function(name, eta, u, y, family, phi, cell_idx = 0L, per_arm_step = TRUE) {
.Call(`_tulpa_cpp_cell_coupling_curvature3`, name, eta, u, y, family, phi, cell_idx, per_arm_step)
}
cpp_cell_coupling_registry_has <- function(name) {
.Call(`_tulpa_cpp_cell_coupling_registry_has`, name)
}
cpp_cell_coupling_registry_size <- function() {
.Call(`_tulpa_cpp_cell_coupling_registry_size`)
}
cpp_cornish_fisher_quantile <- function(mu, sigma, gamma3, gamma1, z, max_abs_gamma3, max_abs_centre) {
.Call(`_tulpa_cpp_cornish_fisher_quantile`, mu, sigma, gamma3, gamma1, z, max_abs_gamma3, max_abs_centre)
}
cpp_cornish_fisher_bands <- function(gamma3, gamma1, max_abs_gamma3, max_abs_centre) {
.Call(`_tulpa_cpp_cornish_fisher_bands`, gamma3, gamma1, max_abs_gamma3, max_abs_centre)
}
cpp_test_compute_cov <- function(d, sigma2, phi, cov_type) {
.Call(`_tulpa_cpp_test_compute_cov`, d, sigma2, phi, cov_type)
}
cpp_test_dcov_dphi <- function(d, sigma2, phi, cov_type) {
.Call(`_tulpa_cpp_test_dcov_dphi`, d, sigma2, phi, cov_type)
}
cpp_gp_cov_value <- function(d, sigma2, phi, cov_type) {
.Call(`_tulpa_cpp_gp_cov_value`, d, sigma2, phi, cov_type)
}
cpp_sample_crt <- function(y, r) {
.Call(`_tulpa_cpp_sample_crt`, y, r)
}
cpp_sample_crt_sum <- function(y, r) {
.Call(`_tulpa_cpp_sample_crt_sum`, y, r)
}
cpp_crt_mean <- function(y, r) {
.Call(`_tulpa_cpp_crt_mean`, y, r)
}
cpp_family_terms <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_terms`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_obs_terms <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_obs_terms`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_obs_weight <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_obs_weight`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_curvature_deta <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_curvature_deta`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_has_curvature_derivative <- function(family) {
.Call(`_tulpa_cpp_family_has_curvature_derivative`, family)
}
cpp_family_curvature_deta_vec <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_curvature_deta_vec`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_curvature_deta2 <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_curvature_deta2`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_has_curvature_2nd_derivative <- function(family) {
.Call(`_tulpa_cpp_family_has_curvature_2nd_derivative`, family)
}
cpp_family_obs_curvature_deta2 <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_obs_curvature_deta2`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_has_obs_curvature_2nd_derivative <- function(family) {
.Call(`_tulpa_cpp_family_has_obs_curvature_2nd_derivative`, family)
}
cpp_family_working_weight_is_observed <- function(family) {
.Call(`_tulpa_cpp_family_working_weight_is_observed`, family)
}
cpp_family_compiled_zi_supported <- function(family) {
.Call(`_tulpa_cpp_family_compiled_zi_supported`, family)
}
cpp_family_compiled_zi_supported_families <- function() {
.Call(`_tulpa_cpp_family_compiled_zi_supported_families`)
}
cpp_family_obs_curvature_delta_vec <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_obs_curvature_delta_vec`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_obs_curvature_delta_deta_vec <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_obs_curvature_delta_deta_vec`, y, n_trials, eta, family, phi, phi2)
}
cpp_family_has_obs_curvature_delta_derivative <- function(family) {
.Call(`_tulpa_cpp_family_has_obs_curvature_delta_derivative`, family)
}
cpp_family_has_exact_mode_jacobian <- function(family) {
.Call(`_tulpa_cpp_family_has_exact_mode_jacobian`, family)
}
cpp_family_curvature_deta2_vec <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_curvature_deta2_vec`, y, n_trials, eta, family, phi, phi2)
}
cpp_zi_mixture_curvature_deriv <- function(y, n_trials, eta, logit_zi, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_zi_mixture_curvature_deriv`, y, n_trials, eta, logit_zi, family, phi, phi2)
}
cpp_zi_mixture_curvature <- function(y, n_trials, eta, logit_zi, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_zi_mixture_curvature`, y, n_trials, eta, logit_zi, family, phi, phi2)
}
cpp_family_has_zi_curvature_derivative <- function(family) {
.Call(`_tulpa_cpp_family_has_zi_curvature_derivative`, family)
}
cpp_zi_mixture_curvature_deriv2 <- function(y, n_trials, eta, logit_zi, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_zi_mixture_curvature_deriv2`, y, n_trials, eta, logit_zi, family, phi, phi2)
}
cpp_family_has_zi_curvature_2nd_derivative <- function(family) {
.Call(`_tulpa_cpp_family_has_zi_curvature_2nd_derivative`, family)
}
cpp_zi_mixture_phi_deriv <- function(y, n_trials, eta, logit_zi, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_zi_mixture_phi_deriv`, y, n_trials, eta, logit_zi, family, phi, phi2)
}
cpp_family_has_zi_phi_deriv <- function(family) {
.Call(`_tulpa_cpp_family_has_zi_phi_deriv`, family)
}
cpp_family_ad_terms <- function(y, n_trials, eta, family, phi, phi2 = NA_real_) {
.Call(`_tulpa_cpp_family_ad_terms`, y, n_trials, eta, family, phi, phi2)
}
cpp_glmm_elt_terms <- function(family, eta, y, n_trials, phi) {
.Call(`_tulpa_cpp_glmm_elt_terms`, family, eta, y, n_trials, phi)
}
cpp_test_laplace_gaussian <- function(y, eta, phi) {
.Call(`_tulpa_cpp_test_laplace_gaussian`, y, eta, phi)
}
cpp_link_ladder <- function(eta, link) {
.Call(`_tulpa_cpp_link_ladder`, eta, link)
}
cpp_gp_field_predict <- function(new_coords, unique_coords, field_grid, sigma2_grid, phi_grid, weights, nn, cov_type) {
.Call(`_tulpa_cpp_gp_field_predict`, new_coords, unique_coords, field_grid, sigma2_grid, phi_grid, weights, nn, cov_type)
}
cpp_gpu_available <- function() {
.Call(`_tulpa_cpp_gpu_available`)
}
cpp_gpu_backend_kind <- function() {
.Call(`_tulpa_cpp_gpu_backend_kind`)
}
cpp_gpu_info <- function() {
.Call(`_tulpa_cpp_gpu_info`)
}
cpp_gpu_batched_cholesky_solve <- function(C_flat, c_rhs, k) {
.Call(`_tulpa_cpp_gpu_batched_cholesky_solve`, C_flat, c_rhs, k)
}
cpp_get_max_threads <- function() {
.Call(`_tulpa_cpp_get_max_threads`)
}
cpp_total_ram_bytes <- function() {
.Call(`_tulpa_cpp_total_ram_bytes`)
}
cpp_available_ram_bytes <- function() {
.Call(`_tulpa_cpp_available_ram_bytes`)
}
cpp_performance_core_count <- function() {
.Call(`_tulpa_cpp_performance_core_count`)
}
cpp_hsgp_basis_2d <- function(coords, m, c) {
.Call(`_tulpa_cpp_hsgp_basis_2d`, coords, m, c)
}
cpp_hsgp_field_predict <- function(coords_train, coords_new, m, c, beta_grid, sigma2_grid, lengthscale_grid, weights) {
.Call(`_tulpa_cpp_hsgp_field_predict`, coords_train, coords_new, m, c, beta_grid, sigma2_grid, lengthscale_grid, weights)
}
cpp_hyperprior_log_density <- function(x, kind, coordinate, U, alpha, d = 2.0, lambda = 7.0) {
.Call(`_tulpa_cpp_hyperprior_log_density`, x, kind, coordinate, U, alpha, d, lambda)
}
cpp_spde_laplace_gradient <- function(y, n_trials, X, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, log_range, log_sigma, nu = 1.0, family = "binomial", phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL) {
.Call(`_tulpa_cpp_spde_laplace_gradient`, y, n_trials, X, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, log_range, log_sigma, nu, family, phi, max_iter, tol, n_threads, x_init_nullable)
}
cpp_interval_gaussian_terms <- function(lower, upper, eta, sigma) {
.Call(`_tulpa_cpp_interval_gaussian_terms`, lower, upper, eta, sigma)
}
cpp_joint_inner_vcov_blocks <- function(Q_p_per_grid, Q_i_per_grid, Q_x_per_grid, n_x, idx, n_dense, A_cols_list, field_marginal = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_joint_inner_vcov_blocks`, Q_p_per_grid, Q_i_per_grid, Q_x_per_grid, n_x, idx, n_dense, A_cols_list, field_marginal, n_threads)
}
cpp_joint_inner_vcov_mixture <- function(Q_p_per_grid, Q_i_per_grid, Q_x_per_grid, n_x, idx, n_dense, A_cols_list, weights, modes = NULL, field_marginal = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_joint_inner_vcov_mixture`, Q_p_per_grid, Q_i_per_grid, Q_x_per_grid, n_x, idx, n_dense, A_cols_list, weights, modes, field_marginal, n_threads)
}
cpp_laplace_fit_multi_re <- function(y, n, X, re_idx_list, re_ngroups, re_sigma_list, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, re_Z_list = NULL, re_ncoefs = NULL, weights = NULL, offset = NULL, x_init = NULL, beta_prior_mean = NULL, beta_prior_sd = NULL, return_re_cov = FALSE, phi2 = NA_real_, X_zi = NULL, zi_prior_sd = 2.5, return_joint_hessian = FALSE, compute_skew = FALSE, skew_idx = NULL, debias = NULL) {
.Call(`_tulpa_cpp_laplace_fit_multi_re`, y, n, X, re_idx_list, re_ngroups, re_sigma_list, family, phi, max_iter, tol, n_threads, re_Z_list, re_ncoefs, weights, offset, x_init, beta_prior_mean, beta_prior_sd, return_re_cov, phi2, X_zi, zi_prior_sd, return_joint_hessian, compute_skew, skew_idx, debias)
}
cpp_laplace_log_marginal_multi_re_batch <- function(y, n, X, re_idx_list, re_ngroups, re_sigma_batch, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads_outer = 1L, re_Z_list = NULL, re_ncoefs = NULL, weights = NULL, offset = NULL, x_init = NULL, beta_prior_mean = NULL, beta_prior_sd = NULL, phi2 = NA_real_, X_zi = NULL, zi_prior_sd = 2.5) {
.Call(`_tulpa_cpp_laplace_log_marginal_multi_re_batch`, y, n, X, re_idx_list, re_ngroups, re_sigma_batch, family, phi, max_iter, tol, n_threads_outer, re_Z_list, re_ncoefs, weights, offset, x_init, beta_prior_mean, beta_prior_sd, phi2, X_zi, zi_prior_sd)
}
cpp_laplace_fit_gp <- function(y, n, X, re_idx, n_re_groups, sigma_re, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2_gp, phi_gp, cov_type, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, offset_nullable = NULL, obs_to_loc_nullable = NULL, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_gp`, y, n, X, re_idx, n_re_groups, sigma_re, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2_gp, phi_gp, cov_type, family, phi, max_iter, tol, n_threads, offset_nullable, obs_to_loc_nullable, compute_skew, skew_idx, weights_nullable)
}
cpp_laplace_fit_spatial <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_spatial, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, offset_nullable = NULL, force_sparse = 0L, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_spatial`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_spatial, family, phi, max_iter, tol, n_threads, x_init_nullable, offset_nullable, force_sparse, compute_skew, skew_idx, weights_nullable)
}
cpp_laplace_fit_bym2 <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, sigma_spatial, rho, scale_factor, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, offset_nullable = NULL, force_sparse = 0L, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL, node_prec_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_bym2`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, sigma_spatial, rho, scale_factor, family, phi, max_iter, tol, n_threads, offset_nullable, force_sparse, compute_skew, skew_idx, weights_nullable, node_prec_nullable)
}
cpp_line_search_probe <- function(slope, c) {
.Call(`_tulpa_cpp_line_search_probe`, slope, c)
}
cpp_newton_converged_probe <- function(delta, grad, step_scale, tol) {
.Call(`_tulpa_cpp_newton_converged_probe`, delta, grad, step_scale, tol)
}
cpp_newton_trust_probe <- function(decrements) {
.Call(`_tulpa_cpp_newton_trust_probe`, decrements)
}
cpp_profile_enable <- function(on) {
.Call(`_tulpa_cpp_profile_enable`, on)
}
cpp_profile_reset <- function() {
invisible(.Call(`_tulpa_cpp_profile_reset`))
}
cpp_profile_read <- function() {
.Call(`_tulpa_cpp_profile_read`)
}
cpp_s2z_densify_max <- function() {
.Call(`_tulpa_cpp_s2z_densify_max`)
}
cpp_laplace_spec_test_gaussian <- function(y, X, re_idx, n_re_groups, sigma_re, sigma_beta, phi, max_iter = 100L, tol = 1e-8, n_threads = 1L) {
.Call(`_tulpa_cpp_laplace_spec_test_gaussian`, y, X, re_idx, n_re_groups, sigma_re, sigma_beta, phi, max_iter, tol, n_threads)
}
cpp_laplace_spec_test_gaussian2p <- function(y1, y2, X1, X2, offset1, offset2, re_idx, n_re_groups, sigma_re, sigma_beta, phi1, phi2, re_into_proc0 = TRUE, re_into_proc1 = TRUE, max_iter = 100L, tol = 1e-10, n_threads = 1L, sparse_override = 0L) {
.Call(`_tulpa_cpp_laplace_spec_test_gaussian2p`, y1, y2, X1, X2, offset1, offset2, re_idx, n_re_groups, sigma_re, sigma_beta, phi1, phi2, re_into_proc0, re_into_proc1, max_iter, tol, n_threads, sparse_override)
}
cpp_laplace_spec_test_multi_re <- function(y, X, re_terms, sigma_beta, phi, max_iter = 200L, tol = 1e-12, n_threads = 1L, sparse_override = 0L, store_Q = FALSE, return_re_cov = FALSE) {
.Call(`_tulpa_cpp_laplace_spec_test_multi_re`, y, X, re_terms, sigma_beta, phi, max_iter, tol, n_threads, sparse_override, store_Q, return_re_cov)
}
cpp_test_tri_solve <- function(Lbuf, n, b, layout, transpose) {
.Call(`_tulpa_cpp_test_tri_solve`, Lbuf, n, b, layout, transpose)
}
cpp_test_chol_factor <- function(Abuf, n, layout) {
.Call(`_tulpa_cpp_test_chol_factor`, Abuf, n, layout)
}
cpp_test_nngp_moments <- function(Lbuf, n, c_vec, w_nb, sigma2, var_floor, layout) {
.Call(`_tulpa_cpp_test_nngp_moments`, Lbuf, n, c_vec, w_nb, sigma2, var_floor, layout)
}
cpp_test_nngp_cond_cores <- function(Cbuf, n, c_vec, w_nb, sigma2, jitter, var_floor) {
.Call(`_tulpa_cpp_test_nngp_cond_cores`, Cbuf, n, c_vec, w_nb, sigma2, jitter, var_floor)
}
cpp_mclmc_test <- function(mu_target, sigma_target, init, n_iter = 2000L, n_warmup = 1000L, seed = 42L, adjusted = FALSE) {
.Call(`_tulpa_cpp_mclmc_test`, mu_target, sigma_target, init, n_iter, n_warmup, seed, adjusted)
}
cpp_multinomial_logit_terms <- function(eta, cls) {
.Call(`_tulpa_cpp_multinomial_logit_terms`, eta, cls)
}
cpp_nested_laplace_icar <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_grid, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_icar`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_grid, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_bym2 <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, scale_factor, sigma_spatial_grid, rho_grid, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL, node_prec = NULL) {
.Call(`_tulpa_cpp_nested_laplace_bym2`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, scale_factor, sigma_spatial_grid, rho_grid, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset, node_prec)
}
cpp_nested_laplace_car_proper <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_grid, rho_grid, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_car_proper`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_grid, rho_grid, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_laplace_fit_car_proper <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_spatial, rho, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, offset_nullable = NULL, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_car_proper`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, tau_spatial, rho, family, phi, max_iter, tol, n_threads, x_init_nullable, offset_nullable, compute_skew, skew_idx, weights_nullable)
}
cpp_nested_laplace_nngp <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2_grid, phi_gp_grid, cov_type, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_nngp`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2_grid, phi_gp_grid, cov_type, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_hsgp <- function(y, n, X, re_idx, n_re_groups, sigma_re, phi_basis, lambda_eig, sigma2_grid, lengthscale_grid, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_hsgp`, y, n, X, re_idx, n_re_groups, sigma_re, phi_basis, lambda_eig, sigma2_grid, lengthscale_grid, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_laplace_fit_hsgp <- function(y, n, X, re_idx, n_re_groups, sigma_re, phi_basis, lambda_eig, sigma2, lengthscale, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, offset_nullable = NULL, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_hsgp`, y, n, X, re_idx, n_re_groups, sigma_re, phi_basis, lambda_eig, sigma2, lengthscale, family, phi, max_iter, tol, n_threads, x_init_nullable, offset_nullable, compute_skew, skew_idx, weights_nullable)
}
cpp_nested_laplace_temporal <- function(y, n, X, re_idx, n_re_groups, sigma_re, temporal_idx, n_times, temporal_type, tau_grid, rho_grid, cyclic, family, phi = 1.0, n_groups = 1L, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_temporal`, y, n, X, re_idx, n_re_groups, sigma_re, temporal_idx, n_times, temporal_type, tau_grid, rho_grid, cyclic, family, phi, n_groups, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_st_icar <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, temporal_idx, n_times, tau_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, force_sparse = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_st_icar`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, temporal_idx, n_times, tau_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, force_sparse, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_st_car_proper <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, temporal_idx, n_times, tau_spatial_grid, rho_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, force_sparse = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_st_car_proper`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, temporal_idx, n_times, tau_spatial_grid, rho_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, force_sparse, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_st_bym2 <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, scale_factor, temporal_idx, n_times, sigma_spatial_grid, rho_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, force_sparse = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL, node_prec = NULL) {
.Call(`_tulpa_cpp_nested_laplace_st_bym2`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial_units, adj_row_ptr, adj_col_idx, n_neighbors, scale_factor, temporal_idx, n_times, sigma_spatial_grid, rho_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, force_sparse, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset, node_prec)
}
cpp_nested_laplace_st_hsgp <- function(y, n, X, re_idx, n_re_groups, sigma_re, phi_basis, lambda_eig, temporal_idx, n_times, sigma2_spatial_grid, lengthscale_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_st_hsgp`, y, n, X, re_idx, n_re_groups, sigma_re, phi_basis, lambda_eig, temporal_idx, n_times, sigma2_spatial_grid, lengthscale_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_st_nngp <- function(y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial, coords, nn_idx, nn_dist, nn_order, nn, cov_type, temporal_idx, n_times, sigma2_spatial_grid, phi_gp_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, offset_nullable = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_st_nngp`, y, n, X, re_idx, n_re_groups, sigma_re, spatial_idx, n_spatial, coords, nn_idx, nn_dist, nn_order, nn, cov_type, temporal_idx, n_times, sigma2_spatial_grid, phi_gp_spatial_grid, temporal_type, tau_temporal_grid, rho_temporal_grid, cyclic, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, checkpoint_path, compute_skew, skew_idx, offset_nullable, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_nested_laplace_joint_multi <- function(arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, phi_grid_per_arm = NULL, n_threads_outer = 1L, tile_ids = NULL, tile_pilot_cells = NULL, prune_tol = 0.0, force_sparse = FALSE, cell_coupling_name = "separable", hessian_pd_mode = 0L, step_curvature_mode = 0L, inner_refresh = 1L, progress = FALSE, progress_every = 0L, progress_throttle = 0.0, progress_file = "", checkpoint_path = "", x_init_per_cell = NULL, compute_skew = FALSE, skew_idx = NULL, fixed_block_p = 0L, fixed_block_constraints = NULL, debias = NULL, cila = NULL, inner_sparse_override = 0L, screen_iters = 2L, screen_log_offset = NULL, compute_fitted_var = TRUE, screen_only = FALSE) {
.Call(`_tulpa_cpp_nested_laplace_joint_multi`, arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets, max_iter, tol, n_threads, x_init_nullable, store_Q, phi_grid_per_arm, n_threads_outer, tile_ids, tile_pilot_cells, prune_tol, force_sparse, cell_coupling_name, hessian_pd_mode, step_curvature_mode, inner_refresh, progress, progress_every, progress_throttle, progress_file, checkpoint_path, x_init_per_cell, compute_skew, skew_idx, fixed_block_p, fixed_block_constraints, debias, cila, inner_sparse_override, screen_iters, screen_log_offset, compute_fitted_var, screen_only)
}
cpp_nested_laplace_joint_multi_batch <- function(arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets, n_batch, y_batch, phi_batch, max_iter = 200L, tol = 1e-6, cell_coupling_name = "separable", store_Q = TRUE, phi_grid_per_arm = NULL, hessian_pd_mode = 0L, step_curvature_mode = 0L, force_sparse = FALSE, fixed_block_p = 0L, fixed_block_constraints = NULL, compute_fitted_var = TRUE) {
.Call(`_tulpa_cpp_nested_laplace_joint_multi_batch`, arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets, n_batch, y_batch, phi_batch, max_iter, tol, cell_coupling_name, store_Q, phi_grid_per_arm, hessian_pd_mode, step_curvature_mode, force_sparse, fixed_block_p, fixed_block_constraints, compute_fitted_var)
}
cpp_test_joint_pattern <- function(arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets) {
.Call(`_tulpa_cpp_test_joint_pattern`, arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets)
}
cpp_test_joint_logpost_grad <- function(arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets, x, k_grid = 0L, sparse = FALSE) {
.Call(`_tulpa_cpp_test_joint_logpost_grad`, arms_list, copy_arms, copy_blocks, blocks_spec, theta_grid, axis_offsets, x, k_grid, sparse)
}
cpp_nested_laplace_multi <- function(y, n, X, re_idx, n_re_groups, sigma_re, blocks_spec, theta_grid, axis_offsets, family, phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, store_Q = FALSE, prune_tol = 0.0, likelihood = NULL, progress = FALSE, progress_every = 0L, progress_throttle = 0.0, progress_file = "", checkpoint_path = "", compute_skew = FALSE, skew_idx = NULL, debias = NULL, cila = NULL, offset_nullable = NULL, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_multi`, y, n, X, re_idx, n_re_groups, sigma_re, blocks_spec, theta_grid, axis_offsets, family, phi, max_iter, tol, n_threads, x_init_nullable, store_Q, prune_tol, likelihood, progress, progress_every, progress_throttle, progress_file, checkpoint_path, compute_skew, skew_idx, debias, cila, offset_nullable, screen_log_offset)
}
cpp_nested_laplace_test_occupancy_likelihood <- function(y, det_prob) {
.Call(`_tulpa_cpp_nested_laplace_test_occupancy_likelihood`, y, det_prob)
}
cpp_test_nl_field_seed <- function(kind, tag, n_spatial_units, scale_factor, adj_row_ptr, adj_col_idx, n_spatial, nn, cov_type, coords, nn_idx, spatial_idx, M, phi_basis, lambda_eig, temporal_type, n_times, cyclic, temporal_idx, n_groups, with_groups) {
.Call(`_tulpa_cpp_test_nl_field_seed`, kind, tag, n_spatial_units, scale_factor, adj_row_ptr, adj_col_idx, n_spatial, nn, cov_type, coords, nn_idx, spatial_idx, M, phi_basis, lambda_eig, temporal_type, n_times, cyclic, temporal_idx, n_groups, with_groups)
}
cpp_nl_lq_group_cdf <- function(is_lq, u, lg, d1, d2, lt, lo_b, hi_b, lo, hi, x) {
.Call(`_tulpa_cpp_nl_lq_group_cdf`, is_lq, u, lg, d1, d2, lt, lo_b, hi_b, lo, hi, x)
}
cpp_test_gp_nngp_twins <- function(w, sigma2, phi, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type) {
.Call(`_tulpa_cpp_test_gp_nngp_twins`, w, sigma2, phi, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type)
}
cpp_test_nngp_nc_grad <- function(z, log_sigma2, log_phi, a, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type, fd_eps = 1e-6) {
.Call(`_tulpa_cpp_test_nngp_nc_grad`, z, log_sigma2, log_phi, a, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type, fd_eps)
}
cpp_test_svc_nngp_twins <- function(w, sigma2, phi, coords, nn_idx, nn_dist, nn_order, cov_type) {
.Call(`_tulpa_cpp_test_svc_nngp_twins`, w, sigma2, phi, coords, nn_idx, nn_dist, nn_order, cov_type)
}
cpp_test_svc_nngp_nc_grad <- function(z, log_sigma2, log_phi, a, coords, nn_idx, nn_dist, nn_order, nn_order_inv, cov_type, fd_eps = 1e-6) {
.Call(`_tulpa_cpp_test_svc_nngp_nc_grad`, z, log_sigma2, log_phi, a, coords, nn_idx, nn_dist, nn_order, nn_order_inv, cov_type, fd_eps)
}
cpp_test_msgp_nngp_nc_grad <- function(z, log_sigma2, log_phi, a, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type, scale, fd_eps = 1e-6) {
.Call(`_tulpa_cpp_test_msgp_nngp_nc_grad`, z, log_sigma2, log_phi, a, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type, scale, fd_eps)
}
cpp_test_log_prior_log_sigma2_half_cauchy <- function(log_sigma2, scale) {
.Call(`_tulpa_cpp_test_log_prior_log_sigma2_half_cauchy`, log_sigma2, scale)
}
cpp_test_log_prior_range_pc <- function(range, U, alpha) {
.Call(`_tulpa_cpp_test_log_prior_range_pc`, range, U, alpha)
}
cpp_test_log_prior_range_pc_at_log <- function(log_range, U, alpha) {
.Call(`_tulpa_cpp_test_log_prior_range_pc_at_log`, log_range, U, alpha)
}
cpp_test_bounded_from_logit <- function(u, lower, upper) {
.Call(`_tulpa_cpp_test_bounded_from_logit`, u, lower, upper)
}
cpp_test_log_jacobian_bounded <- function(phi, lower, upper) {
.Call(`_tulpa_cpp_test_log_jacobian_bounded`, phi, lower, upper)
}
cpp_test_gp_layout_anchor_check <- function(U, alpha) {
invisible(.Call(`_tulpa_cpp_test_gp_layout_anchor_check`, U, alpha))
}
cpp_pg_binomial_gibbs <- function(y, n, X, group, n_groups, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_scale = 2.5, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs`, y, n, X, group, n_groups, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_scale, store_eta, verbose, n_threads)
}
cpp_pg_binomial_gibbs_spatial <- function(y, n, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_tau_shape = 1.0, prior_tau_rate = 0.01, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_spatial`, y, n, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_tau_shape, prior_tau_rate, store_eta, verbose, n_threads)
}
cpp_pg_binomial_gibbs_bym2 <- function(y, n, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, scale_factor, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_sigma_spatial_scale = 2.5, prior_rho_alpha = 0.5, prior_rho_beta = 0.5, store_eta = FALSE, verbose = TRUE, n_threads = 1L, node_prec_nullable = NULL) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_bym2`, y, n, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, scale_factor, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_sigma_spatial_scale, prior_rho_alpha, prior_rho_beta, store_eta, verbose, n_threads, node_prec_nullable)
}
cpp_pg_binomial_gibbs_gp <- function(y, n, X, re_group, n_re_groups, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2_gp_init, phi_gp_init, cov_type, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_sigma_gp_U = 1.0, prior_sigma_gp_alpha = 0.01, prior_phi_lower = 0.01, prior_phi_upper = 10.0, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_gp`, y, n, X, re_group, n_re_groups, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2_gp_init, phi_gp_init, cov_type, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_sigma_gp_U, prior_sigma_gp_alpha, prior_phi_lower, prior_phi_upper, store_eta, verbose, n_threads)
}
cpp_pg_binomial_gibbs_gp_rsr <- function(y, n, X, re_group, n_re_groups, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, rsr_projection, rsr_n, sigma2_gp_init, phi_gp_init, cov_type, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_sigma_gp_U = 1.0, prior_sigma_gp_alpha = 0.01, prior_phi_lower = 0.01, prior_phi_upper = 10.0, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_gp_rsr`, y, n, X, re_group, n_re_groups, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, rsr_projection, rsr_n, sigma2_gp_init, phi_gp_init, cov_type, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_sigma_gp_U, prior_sigma_gp_alpha, prior_phi_lower, prior_phi_upper, store_eta, verbose, n_threads)
}
cpp_pg_binomial_gibbs_multiscale_gp <- function(y, n, X, re_group, n_re_groups, coords, nn_idx_local, nn_dist_local, nn_order_local, nn_local, nn_idx_regional, nn_dist_regional, nn_order_regional, nn_regional, n_spatial, sigma2_local_init, phi_local_init, sigma2_regional_init, phi_regional_init, cov_type, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_sigma_local_U = 1.0, prior_sigma_local_alpha = 0.01, prior_phi_local_lower = 0.01, prior_phi_local_upper = 5.0, prior_sigma_regional_U = 1.0, prior_sigma_regional_alpha = 0.01, prior_phi_regional_lower = 0.1, prior_phi_regional_upper = 20.0, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_multiscale_gp`, y, n, X, re_group, n_re_groups, coords, nn_idx_local, nn_dist_local, nn_order_local, nn_local, nn_idx_regional, nn_dist_regional, nn_order_regional, nn_regional, n_spatial, sigma2_local_init, phi_local_init, sigma2_regional_init, phi_regional_init, cov_type, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_sigma_local_U, prior_sigma_local_alpha, prior_phi_local_lower, prior_phi_local_upper, prior_sigma_regional_U, prior_sigma_regional_alpha, prior_phi_regional_lower, prior_phi_regional_upper, store_eta, verbose, n_threads)
}
cpp_pg_binomial_gibbs_rsr <- function(y, n, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, rsr_projection, rsr_n, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_tau_shape = 1.0, prior_tau_rate = 0.01, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_rsr`, y, n, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, rsr_projection, rsr_n, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_tau_shape, prior_tau_rate, store_eta, verbose, n_threads)
}
cpp_pg_binomial_gibbs_temporal <- function(y, n, X, re_group, n_re_groups, time_idx, n_times, seasonal_period, trend_type, short_type, n_iter = 2000L, n_warmup = 1000L, thin = 1L, prior_beta_sd = 10.0, prior_sigma_re_scale = 2.5, prior_sigma_trend_scale = 1.0, prior_sigma_seasonal_scale = 1.0, prior_sigma_short_scale = 1.0, rho_short_init = 0.5, store_eta = FALSE, verbose = TRUE, n_threads = 1L) {
.Call(`_tulpa_cpp_pg_binomial_gibbs_temporal`, y, n, X, re_group, n_re_groups, time_idx, n_times, seasonal_period, trend_type, short_type, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_sigma_trend_scale, prior_sigma_seasonal_scale, prior_sigma_short_scale, rho_short_init, store_eta, verbose, n_threads)
}
cpp_test_negbin_loglik_eta <- function(y, eta, r) {
.Call(`_tulpa_cpp_test_negbin_loglik_eta`, y, eta, r)
}
cpp_pg_negbin_gibbs <- function(y, X, group, n_groups, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_scale, prior_r_shape, prior_r_rate, r_init, store_eta, verbose, n_threads) {
.Call(`_tulpa_cpp_pg_negbin_gibbs`, y, X, group, n_groups, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_scale, prior_r_shape, prior_r_rate, r_init, store_eta, verbose, n_threads)
}
cpp_pg_negbin_gibbs_spatial <- function(y, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_tau_shape, prior_tau_rate, prior_r_shape, prior_r_rate, r_init, store_eta, verbose, n_threads) {
.Call(`_tulpa_cpp_pg_negbin_gibbs_spatial`, y, X, re_group, n_re_groups, spatial_group, n_spatial_units, adj_list, n_neighbors, n_iter, n_warmup, thin, prior_beta_sd, prior_sigma_re_scale, prior_tau_shape, prior_tau_rate, prior_r_shape, prior_r_rate, r_init, store_eta, verbose, n_threads)
}
cpp_rpg1 <- function(z) {
.Call(`_tulpa_cpp_rpg1`, z)
}
cpp_rpg <- function(b, z) {
.Call(`_tulpa_cpp_rpg`, b, z)
}
cpp_rpg_real <- function(b, z) {
.Call(`_tulpa_cpp_rpg_real`, b, z)
}
cpp_portable_math <- function(fn, x, y) {
.Call(`_tulpa_cpp_portable_math`, fn, x, y)
}
cpp_tulpa_psis <- function(log_ratios, tail_len) {
.Call(`_tulpa_cpp_tulpa_psis`, log_ratios, tail_len)
}
cpp_psis_loo_pit <- function(ll, Fl, Fu, tail_len, n_threads) {
.Call(`_tulpa_cpp_psis_loo_pit`, ll, Fl, Fu, tail_len, n_threads)
}
cpp_tulpa_pit <- function(cdf_upper, cdf_lower, has_lower, jitter) {
.Call(`_tulpa_cpp_tulpa_pit`, cdf_upper, cdf_lower, has_lower, jitter)
}
cpp_glmm_oracle_make <- function(family, phi, y, n_trials, X, Z, idx, n_groups, offset = as.numeric( c())) {
.Call(`_tulpa_cpp_glmm_oracle_make`, family, phi, y, n_trials, X, Z, idx, n_groups, offset)
}
cpp_re_cov_gibbs_sweep <- function(family, phi, y, n_trials, X, blocks, beta0, L_beta, n_iter, n_burnin, thin, beta_prior_mean, beta_prior_sd) {
.Call(`_tulpa_cpp_re_cov_gibbs_sweep`, family, phi, y, n_trials, X, blocks, beta0, L_beta, n_iter, n_burnin, thin, beta_prior_mean, beta_prior_sd)
}
cpp_recov_block_grad <- function(Smat, L, full, lkj_eta = 1.0) {
.Call(`_tulpa_cpp_recov_block_grad`, Smat, L, full, lkj_eta)
}
tulpa_set_integrator_cpp <- function(name, mts_substeps = 4L) {
.Call(`_tulpa_tulpa_set_integrator_cpp`, name, mts_substeps)
}
tulpa_get_integrator_cpp <- function() {
.Call(`_tulpa_tulpa_get_integrator_cpp`)
}
cpp_smc_test <- function(mu_target, sigma_target, n_particles = 500L, n_mcmc_steps = 5L, seed = 42L, bridge_end = 1.0) {
.Call(`_tulpa_cpp_smc_test`, mu_target, sigma_target, n_particles, n_mcmc_steps, seed, bridge_end)
}
cpp_sobol_points <- function(n, d) {
.Call(`_tulpa_cpp_sobol_points`, n, d)
}
cpp_sobol_max_dim <- function() {
.Call(`_tulpa_cpp_sobol_max_dim`)
}
cpp_selected_inversion_diagonal <- function(Q_x, Q_i, Q_p, n) {
.Call(`_tulpa_cpp_selected_inversion_diagonal`, Q_x, Q_i, Q_p, n)
}
cpp_spde_field_se <- function(H, Cq) {
.Call(`_tulpa_cpp_spde_field_se`, H, Cq)
}
cpp_spde_fractional_logmarginal <- function(y, X, A_eff, Pl, C0sub, family, phi, beta_hat, x_hat, n_trials, offset_nullable = NULL, tau_beta = 1e-4, weights_nullable = NULL) {
.Call(`_tulpa_cpp_spde_fractional_logmarginal`, y, X, A_eff, Pl, C0sub, family, phi, beta_hat, x_hat, n_trials, offset_nullable, tau_beta, weights_nullable)
}
cpp_laplace_fit_spde <- function(y, n_trials, X, re_idx, n_re_groups, sigma_re, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, kappa, tau_spde, family, phi = 1.0, alpha = 2L, max_iter = 100L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, rational_poles_nullable = NULL, rational_weights_nullable = NULL, offset_nullable = NULL, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_spde`, y, n_trials, X, re_idx, n_re_groups, sigma_re, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, kappa, tau_spde, family, phi, alpha, max_iter, tol, n_threads, x_init_nullable, rational_poles_nullable, rational_weights_nullable, offset_nullable, compute_skew, skew_idx, weights_nullable)
}
cpp_laplace_fit_spde_precomputed <- function(y, n_trials, X, re_idx, n_re_groups, sigma_re, n_obs, n_mesh, Q_p, Q_i, Q_x, Aeff_x, Aeff_i, Aeff_p, family, phi = 1.0, max_iter = 100L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, offset_nullable = NULL, compute_skew = FALSE, skew_idx = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_laplace_fit_spde_precomputed`, y, n_trials, X, re_idx, n_re_groups, sigma_re, n_obs, n_mesh, Q_p, Q_i, Q_x, Aeff_x, Aeff_i, Aeff_p, family, phi, max_iter, tol, n_threads, x_init_nullable, offset_nullable, compute_skew, skew_idx, weights_nullable)
}
cpp_nested_laplace_spde <- function(y, n_trials, X, re_idx, n_re_groups, sigma_re, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, range_grid, sigma_grid, nu = 1.0, family = "gaussian", phi = 1.0, max_iter = 50L, tol = 1e-6, n_threads = 1L, x_init_nullable = NULL, rational_poles_nullable = NULL, rational_weights_nullable = NULL, store_Q = FALSE, checkpoint_path = "", offset_nullable = NULL, compute_skew = FALSE, skew_idx = NULL, debias = NULL, cila = NULL, prune_tol = 0.0, screen_iters = 2L, compute_fitted_var = TRUE, screen_log_offset = NULL) {
.Call(`_tulpa_cpp_nested_laplace_spde`, y, n_trials, X, re_idx, n_re_groups, sigma_re, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, range_grid, sigma_grid, nu, family, phi, max_iter, tol, n_threads, x_init_nullable, rational_poles_nullable, rational_weights_nullable, store_Q, checkpoint_path, offset_nullable, compute_skew, skew_idx, debias, cila, prune_tol, screen_iters, compute_fitted_var, screen_log_offset)
}
cpp_stochastic_log_determinant <- function(Q_x, Q_i, Q_p, n, n_probes = 30L, n_lanczos = 50L, seed = 42L) {
.Call(`_tulpa_cpp_stochastic_log_determinant`, Q_x, Q_i, Q_p, n, n_probes, n_lanczos, seed)
}
cpp_test_temporal_grad_equiv <- function(w, sigma2, rho, augment = FALSE) {
.Call(`_tulpa_cpp_test_temporal_grad_equiv`, w, sigma2, rho, augment)
}
cpp_test_ar1_omr2_slope <- function(rho) {
.Call(`_tulpa_cpp_test_ar1_omr2_slope`, rho)
}
cpp_test_ccallable_resolves <- function(name) {
.Call(`_tulpa_cpp_test_ccallable_resolves`, name)
}
cpp_register_test_separable_bernoulli_coupling <- function() {
invisible(.Call(`_tulpa_cpp_register_test_separable_bernoulli_coupling`))
}
cpp_register_test_bivariate_gaussian_coupling <- function(lam00, lam11, lam01) {
invisible(.Call(`_tulpa_cpp_register_test_bivariate_gaussian_coupling`, lam00, lam11, lam01))
}
cpp_register_test_occupancy_mixture_coupling <- function() {
invisible(.Call(`_tulpa_cpp_register_test_occupancy_mixture_coupling`))
}
cpp_register_test_weighted_gaussian_coupling <- function(arm_ids) {
invisible(.Call(`_tulpa_cpp_register_test_weighted_gaussian_coupling`, arm_ids))
}
cpp_test_log_det_signal <- function(H_in, prefer_sparse = FALSE, add_ridge = FALSE) {
.Call(`_tulpa_cpp_test_log_det_signal`, H_in, prefer_sparse, add_ridge)
}
cpp_test_fastmath <- function(x, fn) {
.Call(`_tulpa_cpp_test_fastmath`, x, fn)
}
cpp_test_leapfrog <- function(q_init, p_init, epsilon, L) {
.Call(`_tulpa_cpp_test_leapfrog`, q_init, p_init, epsilon, L)
}
cpp_test_hamiltonian <- function(q, p) {
.Call(`_tulpa_cpp_test_hamiltonian`, q, p)
}
cpp_test_log_sum_exp <- function(log_vals) {
.Call(`_tulpa_cpp_test_log_sum_exp`, log_vals)
}
cpp_test_softmax <- function(x) {
.Call(`_tulpa_cpp_test_softmax`, x)
}
cpp_test_inv_logit <- function(x) {
.Call(`_tulpa_cpp_test_inv_logit`, x)
}
cpp_test_lgamma <- function(x) {
.Call(`_tulpa_cpp_test_lgamma`, x)
}
cpp_test_poisson_loglik <- function(y, lambda) {
.Call(`_tulpa_cpp_test_poisson_loglik`, y, lambda)
}
cpp_test_binomial_loglik <- function(y, n, p) {
.Call(`_tulpa_cpp_test_binomial_loglik`, y, n, p)
}
cpp_test_negbin_loglik <- function(y, mu, phi) {
.Call(`_tulpa_cpp_test_negbin_loglik`, y, mu, phi)
}
cpp_test_normal_loglik <- function(y, mu, sigma) {
.Call(`_tulpa_cpp_test_normal_loglik`, y, mu, sigma)
}
cpp_test_cholesky <- function(A) {
.Call(`_tulpa_cpp_test_cholesky`, A)
}
cpp_test_matvec <- function(A, x) {
.Call(`_tulpa_cpp_test_matvec`, A, x)
}
cpp_test_autodiff_gradient <- function(x_vals) {
.Call(`_tulpa_cpp_test_autodiff_gradient`, x_vals)
}
cpp_test_autodiff_exp_chain <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_exp_chain`, x_val)
}
cpp_test_autodiff_log_likelihood <- function(y, eta) {
.Call(`_tulpa_cpp_test_autodiff_log_likelihood`, y, eta)
}
cpp_test_autodiff_division <- function(a_val, b_val) {
.Call(`_tulpa_cpp_test_autodiff_division`, a_val, b_val)
}
cpp_test_autodiff_lgamma <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_lgamma`, x_val)
}
cpp_test_autodiff_softplus <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_softplus`, x_val)
}
cpp_test_autodiff_inv_logit <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_inv_logit`, x_val)
}
cpp_test_autodiff_log <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_log`, x_val)
}
cpp_test_autodiff_sqrt <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_sqrt`, x_val)
}
cpp_test_autodiff_pow <- function(x_val, p) {
.Call(`_tulpa_cpp_test_autodiff_pow`, x_val, p)
}
cpp_test_autodiff_log1p <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_log1p`, x_val)
}
cpp_test_autodiff_log_sum_exp <- function(a_val, b_val) {
.Call(`_tulpa_cpp_test_autodiff_log_sum_exp`, a_val, b_val)
}
cpp_test_autodiff_logit <- function(x_val) {
.Call(`_tulpa_cpp_test_autodiff_logit`, x_val)
}
cpp_test_autodiff_negbin_loglik <- function(y, mu, phi) {
.Call(`_tulpa_cpp_test_autodiff_negbin_loglik`, y, mu, phi)
}
cpp_test_laplace_binomial <- function(y, n, eta) {
.Call(`_tulpa_cpp_test_laplace_binomial`, y, n, eta)
}
cpp_test_laplace_negbin <- function(y, eta, phi) {
.Call(`_tulpa_cpp_test_laplace_negbin`, y, eta, phi)
}
cpp_test_laplace_poisson <- function(y, eta) {
.Call(`_tulpa_cpp_test_laplace_poisson`, y, eta)
}
cpp_test_pg_update_beta <- function(kappa, omega, X, re_contrib, prior_sd) {
.Call(`_tulpa_cpp_test_pg_update_beta`, kappa, omega, X, re_contrib, prior_sd)
}
cpp_test_pg_update_re <- function(kappa, omega, X_beta, group, n_groups, sigma_re) {
.Call(`_tulpa_cpp_test_pg_update_re`, kappa, omega, X_beta, group, n_groups, sigma_re)
}
cpp_test_pg_update_sigma_re <- function(re, scale) {
.Call(`_tulpa_cpp_test_pg_update_sigma_re`, re, scale)
}
cpp_test_dot_product <- function(x, y) {
.Call(`_tulpa_cpp_test_dot_product`, x, y)
}
cpp_test_norm_squared <- function(x) {
.Call(`_tulpa_cpp_test_norm_squared`, x)
}
cpp_test_vector_sum <- function(x) {
.Call(`_tulpa_cpp_test_vector_sum`, x)
}
cpp_test_axpy <- function(a, x, y) {
.Call(`_tulpa_cpp_test_axpy`, a, x, y)
}
cpp_test_scale <- function(a, x) {
.Call(`_tulpa_cpp_test_scale`, a, x)
}
cpp_test_linalg_matvec <- function(X, beta) {
.Call(`_tulpa_cpp_test_linalg_matvec`, X, beta)
}
cpp_test_linalg_matvec_add <- function(X, beta, y_init) {
.Call(`_tulpa_cpp_test_linalg_matvec_add`, X, beta, y_init)
}
cpp_test_linalg_matvec_transpose <- function(X, x) {
.Call(`_tulpa_cpp_test_linalg_matvec_transpose`, X, x)
}
cpp_test_sparse_laplacian_quadform <- function(row_ptr, col_idx, x) {
.Call(`_tulpa_cpp_test_sparse_laplacian_quadform`, row_ptr, col_idx, x)
}
cpp_test_linalg_log_sum_exp <- function(a, b) {
.Call(`_tulpa_cpp_test_linalg_log_sum_exp`, a, b)
}
cpp_test_linalg_log_sum_exp_vec <- function(x) {
.Call(`_tulpa_cpp_test_linalg_log_sum_exp_vec`, x)
}
cpp_test_softmax_inplace <- function(x) {
.Call(`_tulpa_cpp_test_softmax_inplace`, x)
}
cpp_test_compute_linear_predictors <- function(X_num, beta_num, X_denom, beta_denom, n_threads) {
.Call(`_tulpa_cpp_test_compute_linear_predictors`, X_num, beta_num, X_denom, beta_denom, n_threads)
}
cpp_test_rw1_quadratic_form <- function(phi, cyclic) {
.Call(`_tulpa_cpp_test_rw1_quadratic_form`, phi, cyclic)
}
cpp_test_rw2_quadratic_form <- function(phi, cyclic) {
.Call(`_tulpa_cpp_test_rw2_quadratic_form`, phi, cyclic)
}
cpp_test_ar1_log_density <- function(phi, rho, tau) {
.Call(`_tulpa_cpp_test_ar1_log_density`, phi, rho, tau)
}
cpp_test_temporal_log_prior <- function(phi, type_str, tau, rho, cyclic) {
.Call(`_tulpa_cpp_test_temporal_log_prior`, phi, type_str, tau, rho, cyclic)
}
cpp_test_temporal_rank <- function(type_str, T_len, cyclic) {
.Call(`_tulpa_cpp_test_temporal_rank`, type_str, T_len, cyclic)
}
cpp_test_sum_to_zero_penalty <- function(phi) {
.Call(`_tulpa_cpp_test_sum_to_zero_penalty`, phi)
}
cpp_test_s2z_precision <- function(n, kappa) {
.Call(`_tulpa_cpp_test_s2z_precision`, n, kappa)
}
cpp_test_multiscale_temporal_log_lik <- function(trend, seasonal, short_term, sigma2_trend, sigma2_seasonal, sigma2_short, rho_short, trend_type, seasonal_period, short_term_type) {
.Call(`_tulpa_cpp_test_multiscale_temporal_log_lik`, trend, seasonal, short_term, sigma2_trend, sigma2_seasonal, sigma2_short, rho_short, trend_type, seasonal_period, short_term_type)
}
cpp_test_parallel_dot_products <- function(X, y, n_threads) {
.Call(`_tulpa_cpp_test_parallel_dot_products`, X, y, n_threads)
}
cpp_test_parallel_likelihood <- function(y, mu, n_threads) {
.Call(`_tulpa_cpp_test_parallel_likelihood`, y, mu, n_threads)
}
cpp_test_parallel_independent <- function(n, n_threads) {
.Call(`_tulpa_cpp_test_parallel_independent`, n, n_threads)
}
cpp_test_gp_solver_dispatch <- function(w, sigma2, phi, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type, solver, cg_tol, cg_maxiter) {
.Call(`_tulpa_cpp_test_gp_solver_dispatch`, w, sigma2, phi, coords, nn_idx, nn_dist, nn_neighbor_dist, nn_order, nn_order_inv, cov_type, solver, cg_tol, cg_maxiter)
}
cpp_test_arena_custom_backward <- function(x_val, y_val) {
.Call(`_tulpa_cpp_test_arena_custom_backward`, x_val, y_val)
}
cpp_test_spde_nc_transform_grad <- function(C0_diag, G1_x, G1_i, G1_p, z_init, log_kappa_val, log_tau_val, fd_eps = 1e-5, poles_nullable = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_test_spde_nc_transform_grad`, C0_diag, G1_x, G1_i, G1_p, z_init, log_kappa_val, log_tau_val, fd_eps, poles_nullable, weights_nullable)
}
cpp_test_spde_nc_transform_fwd <- function(C0_diag, G1_x, G1_i, G1_p, z_init, log_kappa_val, log_tau_val, fd_eps = 1e-5, poles_nullable = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_test_spde_nc_transform_fwd`, C0_diag, G1_x, G1_i, G1_p, z_init, log_kappa_val, log_tau_val, fd_eps, poles_nullable, weights_nullable)
}
cpp_test_s2z_block_schur <- function(A, pin_start, pin_n, pin_coef, grad, pin_coupling = NULL, pin_idx = NULL) {
.Call(`_tulpa_cpp_test_s2z_block_schur`, A, pin_start, pin_n, pin_coef, grad, pin_coupling, pin_idx)
}
cpp_test_log_prior_icar <- function(x, n, tau, adj_rp, adj_ci, nnbr) {
.Call(`_tulpa_cpp_test_log_prior_icar`, x, n, tau, adj_rp, adj_ci, nnbr)
}
cpp_test_mcar_prior <- function(theta_logchol, p, n, adj_rp, adj_ci, nnbr, x) {
.Call(`_tulpa_cpp_test_mcar_prior`, theta_logchol, p, n, adj_rp, adj_ci, nnbr, x)
}
cpp_test_outer_thread_mem_budget <- function(avail_bytes, total_bytes) {
.Call(`_tulpa_cpp_test_outer_thread_mem_budget`, avail_bytes, total_bytes)
}
cpp_test_outer_thread_cap <- function(budget_bytes, per_thread_bytes) {
.Call(`_tulpa_cpp_test_outer_thread_cap`, budget_bytes, per_thread_bytes)
}
cpp_test_grid_factor_bytes <- function(k) {
.Call(`_tulpa_cpp_test_grid_factor_bytes`, k)
}
cpp_test_miid_prior <- function(theta_logchol, p, n, x) {
.Call(`_tulpa_cpp_test_miid_prior`, theta_logchol, p, n, x)
}
cpp_pc_prior_scales <- function(sigma, U, alpha) {
.Call(`_tulpa_cpp_pc_prior_scales`, sigma, U, alpha)
}
cpp_test_hessian_pattern_guard <- function(A, omit_entry = -1L, raise = FALSE, slot_val = 0.0) {
.Call(`_tulpa_cpp_test_hessian_pattern_guard`, A, omit_entry, raise, slot_val)
}
cpp_spatial_partition_probe <- function(n_units, row_ptr, col_idx, n_neighbors, use_setter) {
.Call(`_tulpa_cpp_spatial_partition_probe`, n_units, row_ptr, col_idx, n_neighbors, use_setter)
}
cpp_test_spde_assemble <- function(C0_diag, G1_x, G1_i, G1_p, range, sigma, nu, alpha) {
.Call(`_tulpa_cpp_test_spde_assemble`, C0_diag, G1_x, G1_i, G1_p, range, sigma, nu, alpha)
}
cpp_test_nngp_prior_scatter <- function(w, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2, phi_gp, cov_type) {
.Call(`_tulpa_cpp_test_nngp_prior_scatter`, w, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, sigma2, phi_gp, cov_type)
}
cpp_test_lse_guard <- function(a, b) {
.Call(`_tulpa_cpp_test_lse_guard`, a, b)
}
cpp_test_scalar_guard <- function(fn, x, p = 2.0) {
.Call(`_tulpa_cpp_test_scalar_guard`, fn, x, p)
}
cpp_test_update_spatial_icar <- function(kappa, omega, offset, group, adj_list, n_neighbors, n_units, tau, phi, beta0, prior_beta_sd) {
.Call(`_tulpa_cpp_test_update_spatial_icar`, kappa, omega, offset, group, adj_list, n_neighbors, n_units, tau, phi, beta0, prior_beta_sd)
}
cpp_test_pg_icar_prior <- function(adj_list, n_neighbors, n_units, x, node_prec = NULL) {
.Call(`_tulpa_cpp_test_pg_icar_prior`, adj_list, n_neighbors, n_units, x, node_prec)
}
cpp_test_spde_nc_transform_Q <- function(C0_diag, G1_x, G1_i, G1_p, log_kappa_val, log_tau_val, poles_nullable = NULL, weights_nullable = NULL) {
.Call(`_tulpa_cpp_test_spde_nc_transform_Q`, C0_diag, G1_x, G1_i, G1_p, log_kappa_val, log_tau_val, poles_nullable, weights_nullable)
}
cpp_test_tgmrf_block_spec <- function(bs) {
.Call(`_tulpa_cpp_test_tgmrf_block_spec`, bs)
}
cpp_test_tgmrf_block_pattern <- function(bs) {
.Call(`_tulpa_cpp_test_tgmrf_block_pattern`, bs)
}
cpp_test_hsgp_warm_start <- function(has_hsgp, n_basis = 4L, n_spatial = 6L) {
.Call(`_tulpa_cpp_test_hsgp_warm_start`, has_hsgp, n_basis, n_spatial)
}
cpp_test_laplace_sample <- function(mode, H, n_samples) {
.Call(`_tulpa_cpp_test_laplace_sample`, mode, H, n_samples)
}
cpp_test_lkj_build_L <- function(raw, n) {
.Call(`_tulpa_cpp_test_lkj_build_L`, raw, n)
}
cpp_test_lkj_raw_from_L <- function(L) {
.Call(`_tulpa_cpp_test_lkj_raw_from_L`, L)
}
cpp_test_lkj_density <- function(L, eta) {
.Call(`_tulpa_cpp_test_lkj_density`, L, eta)
}
cpp_test_lkj_grad <- function(raw, n, eta) {
.Call(`_tulpa_cpp_test_lkj_grad`, raw, n, eta)
}
cpp_test_compute_u_eff <- function(L, sigma, z) {
.Call(`_tulpa_cpp_test_compute_u_eff`, L, sigma, z)
}
cpp_test_chol_nc_chain_rule <- function(L, sigma, z, raw, u_eff, glik) {
.Call(`_tulpa_cpp_test_chol_nc_chain_rule`, L, sigma, z, raw, u_eff, glik)
}
cpp_test_correlation_from_L <- function(L) {
.Call(`_tulpa_cpp_test_correlation_from_L`, L)
}
cpp_test_lowrank_mass_apply <- function(inv_mass_diag, start, group_ptr, group_idx, lambda, p, coeff = 0.37, group_w = as.numeric( c())) {
.Call(`_tulpa_cpp_test_lowrank_mass_apply`, inv_mass_diag, start, group_ptr, group_idx, lambda, p, coeff, group_w)
}
cpp_test_lowrank_mass_momentum <- function(inv_mass_diag, start, group_ptr, group_idx, lambda, n_draws, seed = 1L, group_w = as.numeric( c())) {
.Call(`_tulpa_cpp_test_lowrank_mass_momentum`, inv_mass_diag, start, group_ptr, group_idx, lambda, n_draws, seed, group_w)
}
cpp_test_margin_mass_term <- function(S, T, lambda_row, lambda_col, var, start = 0L, lambda_trend = 0.0) {
.Call(`_tulpa_cpp_test_margin_mass_term`, S, T, lambda_row, lambda_col, var, start, lambda_trend)
}
cpp_test_nan_gradient_nuts <- function(plant_nan, K = 3L, n_iter = 40L, n_warmup = 20L, seed = 1L, bypass_gate = TRUE) {
.Call(`_tulpa_cpp_test_nan_gradient_nuts`, plant_nan, K, n_iter, n_warmup, seed, bypass_gate)
}
cpp_test_nuts_gradient_throws <- function(throw_after = 30L, K = 3L, n_iter = 40L, n_warmup = 20L, seed = 1L) {
invisible(.Call(`_tulpa_cpp_test_nuts_gradient_throws`, throw_after, K, n_iter, n_warmup, seed))
}
cpp_test_nuts_progress_active <- function() {
.Call(`_tulpa_cpp_test_nuts_progress_active`)
}
cpp_test_divergence_predicates <- function(log_prob, q, p, H0, H_new, delta_max = 1000.0) {
.Call(`_tulpa_cpp_test_divergence_predicates`, log_prob, q, p, H0, H_new, delta_max)
}
cpp_test_pg_nngp_conditional <- function(coords, nn_idx, nn_dist, nn_order, n_spatial, nn, w, sigma2, phi, cov_type = 0L) {
.Call(`_tulpa_cpp_test_pg_nngp_conditional`, coords, nn_idx, nn_dist, nn_order, n_spatial, nn, w, sigma2, phi, cov_type)
}
cpp_test_smc_cabi <- function(y, n_trials, X, family, phi, sigma_beta, n_particles, seed, bridge_end) {
.Call(`_tulpa_cpp_test_smc_cabi`, y, n_trials, X, family, phi, sigma_beta, n_particles, seed, bridge_end)
}
cpp_test_st_hsgp_log_prior <- function(delta, eigenvalues, T, log_tau_st, log_sigma2_hsgp, log_lengthscale_hsgp, temporal = "rw2", temporal_cyclic = FALSE, logit_rho_st = 0.0, st_parameterization = 0L) {
.Call(`_tulpa_cpp_test_st_hsgp_log_prior`, delta, eigenvalues, T, log_tau_st, log_sigma2_hsgp, log_lengthscale_hsgp, temporal, temporal_cyclic, logit_rho_st, st_parameterization)
}
cpp_test_st_trend_precision <- function(T) {
.Call(`_tulpa_cpp_test_st_trend_precision`, T)
}
cpp_test_st_iv_nuts <- function(y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, family = "poisson", temporal = "rw1", temporal_cyclic = FALSE, st_parameterization = 0L, mass_matrix = "diag", n_iter = 1000L, n_warmup = 500L, max_treedepth = 10L, adapt_delta = 0.8, seed = 1L, sigma_beta = 10.0, verbose = FALSE, st_type = "iv") {
.Call(`_tulpa_cpp_test_st_iv_nuts`, y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, family, temporal, temporal_cyclic, st_parameterization, mass_matrix, n_iter, n_warmup, max_treedepth, adapt_delta, seed, sigma_beta, verbose, st_type)
}
cpp_test_st_iv_layout <- function(y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, family = "poisson", temporal = "rw1", temporal_cyclic = FALSE, st_parameterization = 0L, sigma_beta = 10.0, st_type = "iv") {
.Call(`_tulpa_cpp_test_st_iv_layout`, y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, family, temporal, temporal_cyclic, st_parameterization, sigma_beta, st_type)
}
cpp_test_st_iv_gmrf_mass <- function(y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, q, family = "poisson", temporal = "rw1", temporal_cyclic = FALSE, st_parameterization = 0L, sigma_beta = 10.0, with_eta_weights = TRUE, st_type = "iv") {
.Call(`_tulpa_cpp_test_st_iv_gmrf_mass`, y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, q, family, temporal, temporal_cyclic, st_parameterization, sigma_beta, with_eta_weights, st_type)
}
cpp_test_st_iv_log_post <- function(y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, q, family = "poisson", temporal = "rw1", temporal_cyclic = FALSE, st_parameterization = 0L, sigma_beta = 10.0, st_type = "iv") {
.Call(`_tulpa_cpp_test_st_iv_log_post`, y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, q, family, temporal, temporal_cyclic, st_parameterization, sigma_beta, st_type)
}
cpp_test_st_iv_log_prior <- function(y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, q, family = "poisson", temporal = "rw1", temporal_cyclic = FALSE, st_parameterization = 0L, sigma_beta = 10.0, st_type = "iv") {
.Call(`_tulpa_cpp_test_st_iv_log_prior`, y, X, s_idx, t_idx, adj_row_ptr, adj_col_idx, S, T, q, family, temporal, temporal_cyclic, st_parameterization, sigma_beta, st_type)
}
cpp_test_temporal_gp_density <- function(times, n_groups, field, log_sigma2, logit_phi, parameterization, phi_lower = 0.01, phi_upper = 10.0) {
.Call(`_tulpa_cpp_test_temporal_gp_density`, times, n_groups, field, log_sigma2, logit_phi, parameterization, phi_lower, phi_upper)
}
cpp_tgmrf_nuts_joint <- function(y, n_trials, X, obs_idx, family, phi, cpp_id, theta_dim, n_latent, beta_init, z_init, theta_init, M_inv_diag, epsilon0, n_iter, n_warmup, max_depth, target_accept, fd_step, verbose, seed, debug_gradient_check, gradient_check_tol, fd_check_step) {
.Call(`_tulpa_cpp_tgmrf_nuts_joint`, y, n_trials, X, obs_idx, family, phi, cpp_id, theta_dim, n_latent, beta_init, z_init, theta_init, M_inv_diag, epsilon0, n_iter, n_warmup, max_depth, target_accept, fd_step, verbose, seed, debug_gradient_check, gradient_check_tol, fd_check_step)
}
cpp_tgmrf_registry_has <- function(id) {
.Call(`_tulpa_cpp_tgmrf_registry_has`, id)
}
cpp_tgmrf_registry_size <- function() {
.Call(`_tulpa_cpp_tgmrf_registry_size`)
}
cpp_tgmrf_eval <- function(id, theta) {
.Call(`_tulpa_cpp_tgmrf_eval`, id, theta)
}
cpp_tgmrf_eval_mu <- function(id, theta) {
.Call(`_tulpa_cpp_tgmrf_eval_mu`, id, theta)
}
cpp_truncated_gaussian_terms <- function(y, upper, eta, sigma) {
.Call(`_tulpa_cpp_truncated_gaussian_terms`, y, upper, eta, sigma)
}
cpp_tulpa_fit_beta_nuts <- function(y_r, X_r, sigma_beta = 10.0, log_phi_prior_sd = 3.0, log_phi_init = 0.0, n_iter = 2000L, n_warmup = 1000L, max_treedepth = 10L, adapt_delta = 0.8, seed = 42L, verbose = FALSE) {
.Call(`_tulpa_cpp_tulpa_fit_beta_nuts`, y_r, X_r, sigma_beta, log_phi_prior_sd, log_phi_init, n_iter, n_warmup, max_treedepth, adapt_delta, seed, verbose)
}
cpp_tulpa_fit_generic <- function(y_r, X_r, sigma_beta = 10.0, n_iter = 2000L, n_warmup = 1000L, max_treedepth = 10L, adapt_delta = 0.8, seed = 42L, verbose = TRUE, init = NULL, inv_metric_init = NULL) {
.Call(`_tulpa_cpp_tulpa_fit_generic`, y_r, X_r, sigma_beta, n_iter, n_warmup, max_treedepth, adapt_delta, seed, verbose, init, inv_metric_init)
}
cpp_tulpa_fit_generic_chains <- function(y_r, X_r, n_chains = 4L, sigma_beta = 10.0, n_iter = 2000L, n_warmup = 1000L, max_treedepth = 10L, adapt_delta = 0.8, seed = 42L, verbose = FALSE, init = NULL, inv_metric_init = NULL, checkpoint_path = "") {
.Call(`_tulpa_cpp_tulpa_fit_generic_chains`, y_r, X_r, n_chains, sigma_beta, n_iter, n_warmup, max_treedepth, adapt_delta, seed, verbose, init, inv_metric_init, checkpoint_path)
}
cpp_test_c_abi_resume_roundtrip <- function(y_r, X_r, n_iter = 600L, n_warmup = 300L, max_treedepth = 7L, adapt_delta = 0.85, seed = 9L, init = NULL, inv_metric_init = NULL) {
.Call(`_tulpa_cpp_test_c_abi_resume_roundtrip`, y_r, X_r, n_iter, n_warmup, max_treedepth, adapt_delta, seed, init, inv_metric_init)
}
cpp_test_c_abi_chains_roundtrip <- function(y_r, X_r, n_chains = 3L, n_iter = 600L, n_warmup = 300L, max_treedepth = 7L, adapt_delta = 0.85, seed = 30L, init = NULL, inv_metric_init = NULL) {
.Call(`_tulpa_cpp_test_c_abi_chains_roundtrip`, y_r, X_r, n_chains, n_iter, n_warmup, max_treedepth, adapt_delta, seed, init, inv_metric_init)
}
cpp_tulpa_glmm_eta_draws <- function(draws, y, n_trials, X, family, phi = 1.0, sigma_beta = 10.0, offset_nullable = NULL, re_spec = NULL, spatial_spec = NULL, temporal_spec = NULL, sigma_re_scale = 2.5, phi2 = NA_real_, svc_spec = NULL, tvc_spec = NULL, zi_spec = NULL) {
.Call(`_tulpa_cpp_tulpa_glmm_eta_draws`, draws, y, n_trials, X, family, phi, sigma_beta, offset_nullable, re_spec, spatial_spec, temporal_spec, sigma_re_scale, phi2, svc_spec, tvc_spec, zi_spec)
}
cpp_tulpa_glmm_log_prob_draws <- function(draws, y, n_trials, X, family, phi = 1.0, sigma_beta = 10.0, offset_nullable = NULL, re_spec = NULL, spatial_spec = NULL, temporal_spec = NULL, sigma_re_scale = 2.5, phi2 = NA_real_, svc_spec = NULL, tvc_spec = NULL, zi_spec = NULL) {
.Call(`_tulpa_cpp_tulpa_glmm_log_prob_draws`, draws, y, n_trials, X, family, phi, sigma_beta, offset_nullable, re_spec, spatial_spec, temporal_spec, sigma_re_scale, phi2, svc_spec, tvc_spec, zi_spec)
}
cpp_tulpa_glmm_layout <- function(y, n_trials, X, family, phi = 1.0, phi2 = NA_real_, sigma_beta = 10.0, offset_nullable = NULL, re_spec = NULL, spatial_spec = NULL, temporal_spec = NULL, sigma_re_scale = 2.5, fixed_names = NULL, svc_spec = NULL, tvc_spec = NULL, zi_spec = NULL) {
.Call(`_tulpa_cpp_tulpa_glmm_layout`, y, n_trials, X, family, phi, phi2, sigma_beta, offset_nullable, re_spec, spatial_spec, temporal_spec, sigma_re_scale, fixed_names, svc_spec, tvc_spec, zi_spec)
}
cpp_vi_elbo_grad <- function(y, n_trials, X, family, variant, mc_samples, seed, rank = 2L, x = NULL, phi = 1.0, sigma_beta = 10.0, offset_nullable = NULL) {
.Call(`_tulpa_cpp_vi_elbo_grad`, y, n_trials, X, family, variant, mc_samples, seed, rank, x, phi, sigma_beta, offset_nullable)
}
cpp_tulpa_sample_glmm <- function(y, n_trials, X, family, backend, phi = 1.0, sigma_beta = 10.0, n_iter = 2000L, n_warmup = 1000L, seed = 42L, verbose = FALSE, n_chains = 4L, max_treedepth = 10L, adapt_delta = 0.8, epsilon = 0.0, L = 10L, batch_size = 0L, alpha = 0.1, mclmc_adjusted = 0L, n_particles = 1000L, n_mcmc_steps = 5L, ess_threshold = 0.5, vi_variant = 3L, vi_mc_samples = 10L, vi_max_iter = 10000L, vi_n_draws = 2000L, vi_max_grad_norm = 10.0, vi_tol_grad = 1e-4, vi_tol_rel_elbo = 0.01, vi_patience = 50L, offset_nullable = NULL, re_spec = NULL, spatial_spec = NULL, temporal_spec = NULL, sigma_re_scale = 2.5, fixed_names = NULL, phi2 = NA_real_, svc_spec = NULL, tvc_spec = NULL, zi_spec = NULL, init_nullable = NULL, inv_metric_diag_nullable = NULL, mass_matrix = "diag", ess_adapt_during_warmup = TRUE, ess_adapt_interval = 50L, ess_joint_sigma_re = -1L, ess_joint_proposal_sd = 0.1, checkpoint_path = "", smc_bridge_end = 1.0) {
.Call(`_tulpa_cpp_tulpa_sample_glmm`, y, n_trials, X, family, backend, phi, sigma_beta, n_iter, n_warmup, seed, verbose, n_chains, max_treedepth, adapt_delta, epsilon, L, batch_size, alpha, mclmc_adjusted, n_particles, n_mcmc_steps, ess_threshold, vi_variant, vi_mc_samples, vi_max_iter, vi_n_draws, vi_max_grad_norm, vi_tol_grad, vi_tol_rel_elbo, vi_patience, offset_nullable, re_spec, spatial_spec, temporal_spec, sigma_re_scale, fixed_names, phi2, svc_spec, tvc_spec, zi_spec, init_nullable, inv_metric_diag_nullable, mass_matrix, ess_adapt_during_warmup, ess_adapt_interval, ess_joint_sigma_re, ess_joint_proposal_sd, checkpoint_path, smc_bridge_end)
}
cpp_spde_layout_probe <- function(n_mesh, p, joint_hypers, n_extra_params = 0L) {
.Call(`_tulpa_cpp_spde_layout_probe`, n_mesh, p, joint_hypers, n_extra_params)
}
cpp_spde_prior_probe <- function(vals, joint_hypers, C0_diag, G1_x, G1_i, G1_p, kappa = 1.0, tau_spde = 1.0, alpha = 2L) {
.Call(`_tulpa_cpp_spde_prior_probe`, vals, joint_hypers, C0_diag, G1_x, G1_i, G1_p, kappa, tau_spde, alpha)
}
cpp_spde_nc_apply_probe <- function(z, log_kappa, log_tau, C0_diag, G1_x, G1_i, G1_p) {
.Call(`_tulpa_cpp_spde_nc_apply_probe`, z, log_kappa, log_tau, C0_diag, G1_x, G1_i, G1_p)
}
cpp_spde_hyper_prior_probe <- function(log_kappa, log_tau, nu = 1.0, prior_range_0 = -1.0, prior_range_alpha = -1.0, prior_sigma_0 = -1.0, prior_sigma_alpha = -1.0, n_mesh = 4L) {
.Call(`_tulpa_cpp_spde_hyper_prior_probe`, log_kappa, log_tau, nu, prior_range_0, prior_range_alpha, prior_sigma_0, prior_sigma_alpha, n_mesh)
}
cpp_tulpa_fit_spde_nuts <- function(y_r, n_trials_r, X_r, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, kappa, tau_spde, family, alpha = 2L, nu = -1.0, sigma_beta = 10.0, log_phi_prior_sd = 3.0, log_phi_init = 0.0, n_iter = 2000L, n_warmup = 1000L, max_treedepth = 10L, adapt_delta = 0.8, seed = 42L, verbose = FALSE, rational_poles_nullable = NULL, rational_weights_nullable = NULL, joint_hypers = FALSE, prior_range_0 = -1.0, prior_range_alpha = -1.0, prior_sigma_0 = -1.0, prior_sigma_alpha = -1.0, log_kappa_init = 0.0, log_tau_init = 0.0, Q_precomp_x = NULL, Q_precomp_i = NULL, Q_precomp_p = NULL, noncenter = TRUE, mass_matrix = "diag") {
.Call(`_tulpa_cpp_tulpa_fit_spde_nuts`, y_r, n_trials_r, X_r, A_x, A_i, A_p, n_obs, n_mesh, C0_diag, G1_x, G1_i, G1_p, kappa, tau_spde, family, alpha, nu, sigma_beta, log_phi_prior_sd, log_phi_init, n_iter, n_warmup, max_treedepth, adapt_delta, seed, verbose, rational_poles_nullable, rational_weights_nullable, joint_hypers, prior_range_0, prior_range_alpha, prior_sigma_0, prior_sigma_alpha, log_kappa_init, log_tau_init, Q_precomp_x, Q_precomp_i, Q_precomp_p, noncenter, mass_matrix)
}
cpp_test_funnel_nuts <- function(K = 9L, gamma = 3.0, n_iter = 3000L, n_warmup = 1000L, max_treedepth = 10L, adapt_delta = 0.8, seed = 1L, walnuts = FALSE, max_step_halvings = 10L, max_error = 0.5, neck = TRUE, verbose = FALSE) {
.Call(`_tulpa_cpp_test_funnel_nuts`, K, gamma, n_iter, n_warmup, max_treedepth, adapt_delta, seed, walnuts, max_step_halvings, max_error, neck, verbose)
}
cpp_vi_convergence_replay <- function(elbo, grad, tol_grad = 1e-4, tol_rel_elbo = 0.01, patience = 50L) {
.Call(`_tulpa_cpp_vi_convergence_replay`, elbo, grad, tol_grad, tol_rel_elbo, patience)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.