Skip to content

Commit

Permalink
init_model_methods for pathfinder
Browse files Browse the repository at this point in the history
closes #872
  • Loading branch information
jgabry committed Nov 10, 2023
1 parent 0d0f307 commit 6844a6a
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -1904,23 +1904,26 @@ pathfinder <- function(data = NULL,
model_variables <- self$variables()
}
pathfinder_args <- PathfinderArgs$new(
init_alpha = init_alpha,
tol_obj = tol_obj,
tol_rel_obj = tol_rel_obj,
tol_grad = tol_grad,
tol_rel_grad = tol_rel_grad,
tol_param = tol_param,
history_size = history_size,
draws = draws,
single_path_draws = single_path_draws,
num_paths = num_paths,
max_lbfgs_iters = max_lbfgs_iters,
num_elbo_draws = num_elbo_draws,
save_single_paths = save_single_paths)
init_alpha = init_alpha,
tol_obj = tol_obj,
tol_rel_obj = tol_rel_obj,
tol_grad = tol_grad,
tol_rel_grad = tol_rel_grad,
tol_param = tol_param,
history_size = history_size,
draws = draws,
single_path_draws = single_path_draws,
num_paths = num_paths,
max_lbfgs_iters = max_lbfgs_iters,
num_elbo_draws = num_elbo_draws,
save_single_paths = save_single_paths
)
args <- CmdStanArgs$new(
method_args = pathfinder_args,
stan_file = self$stan_file(),
stan_code = suppressWarnings(self$code()),
model_methods_env = private$model_methods_env_,
standalone_env = self$functions,
model_name = self$model_name(),
exe_file = self$exe_file(),
proc_ids = 1,
Expand Down

0 comments on commit 6844a6a

Please sign in to comment.