Skip to content

Commit

Permalink
fix pareto_smooth call with explicit argument
Browse files Browse the repository at this point in the history
  • Loading branch information
avehtari committed Mar 28, 2024
1 parent 0ebe16d commit 099a352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/args.R
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ process_init_approx <- function(init, num_procs, model_variables = NULL,
draws_df$pareto_weight = exp(draws_df$lw - max(draws_df$lw))
} else {
draws_df$pareto_weight = posterior::pareto_smooth(
exp(draws_df$lw - max(draws_df$lw)), tail = "right")[["x"]]
exp(draws_df$lw - max(draws_df$lw)), tail = "right", return_k=FALSE)
}
init_draws_df = posterior::resample_draws(draws_df, ndraws = num_procs,
weights = draws_df$pareto_weight, method = "simple_no_replace")
Expand Down

0 comments on commit 099a352

Please sign in to comment.