Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move things around #404

Merged
merged 34 commits into from
Oct 18, 2024
Merged

Move things around #404

merged 34 commits into from
Oct 18, 2024

Conversation

martinju
Copy link
Member

@martinju martinju commented Oct 7, 2024

Aiming at fixing these TODOs from #402

  • Moving compute_sd, n_boot_samps, max_batch_size, min_n_batches out of adaptive_arguments and into a new argument list called extra_estimation_args
  • Rename adaptive to iterative (better reflecting what is actually going on)
  • Renaming adaptive_arguments to iterative_args
  • Move keep_samp_for_vS, MSEv_uniform_comb_weights and saving_path into a new input arg called output_args
  • Renaming shapley_reweighting to kernelSHAP_reweighting
  • Move saving_path and iterative_results to the main output to make it easier to access for users
  • convergence_tolerance -> convergence_tol

Updated arguments of explain:

explain <- function(model,
                    x_explain,
                    x_train,
                    approach,
                    prediction_zero,
                    iterative = NULL,
                    max_n_coalitions = NULL,
                    group = NULL,
                    paired_shap_sampling = TRUE,
                    n_MC_samples = 1e3,
                    kernelSHAP_reweighting = "on_all_cond",
                    seed = 1,
                    verbose = "basic",
                    predict_model = NULL,
                    get_model_specs = NULL,
                    prev_shapr_object = NULL,
                    extra_computation_args = list(),
                    iterative_args = list(),
                    output_args = list(),
                    ...) { # ... is further arguments passed to specific approaches

Updated output from explain()

  output <- list(
    shapley_values = dt_shapley_est,
    shapley_values_sd = dt_shapley_sd,
    pred_explain = p,
    MSEv = MSEv,
    iterative_results = iterative_results,
    saving_path = internal$parameters$output_args$saving_path,
    internal = internal
  )

@martinju martinju mentioned this pull request Oct 7, 2024
13 tasks
@martinju martinju marked this pull request as ready for review October 9, 2024 08:16
@martinju martinju merged commit bf0780d into shapr-1.0.0 Oct 18, 2024
5 checks passed
@martinju martinju deleted the move_things_around branch October 18, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant