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

Function and documentation cleanup #427

Merged
merged 31 commits into from
Dec 19, 2024
Merged

Function and documentation cleanup #427

merged 31 commits into from
Dec 19, 2024

Conversation

martinju
Copy link
Member

@martinju martinju commented Dec 18, 2024

  • Went through and updated the documentation for all functions, trying to make the style more consistent throughout the package with links etc. Also made sure all exported functions are documented. Reuse documentation whenever possible.
  • Ensure only functions that needs to be exported actually are exported. The rest are not exported. Functions used in pyhton needs to be exported, but if they are not intended to be used by the end user, the keyword internal is used, such that they do not show up in the list of user functions.
  • Remove the additional seed argument from the boostrap-functions. (Such that the seed argument passed to explain() controls the whole thing).
  • Replace ::: with a surrounding \dontrun{ in examples of internal functions (CRAN will complain about :::)
  • Some function/argument changes
    • default_doc_explain -> default_doc_export
    • default_doc -> default_doc_internal
    • sample_features_cpp -> sample_coalitions_cpp (+args: n_features -> n_coalitions)
    • observation_impute_cpp: arg xtrain -> x_train, xtest -> x_explain
    • compute_AICc_each_k: arg Xtest-> Xexplain
    • distance_matrix : arg Xtest_mat-> Xexplain_mat
    • setup_approach.timeseries: arg timeseries.fixed_sigma_vec-> timeseries.fixed_sigma
    • create_marginal_data_categoric -> create_marginal_data_cat
    • check_categorical_valid_MCsamp: arg joint_probability_dt -> joint_prob_dt
    • mahalanobis_distance_cpp: arg Xtest_mat -> Xexplain_mat
    • observation_impute_cpp: arg: xtrain -> x_train, xtest -> x_test
    • compute_shapley_new -> compute_shapley
  • Remove MSEv from explain_forecast (as it was only supported for horizon=1). Should return in a more general manner in the future.

Other minor mentions

  • Remove duplicate of function boostrap_shapley, and other unused function.
  • Remove TODOs mentioned in the code

@LHBO
Copy link
Collaborator

LHBO commented Dec 19, 2024

Read through the changes it looks good when you make the changes we talked about on Teams.

@martinju martinju marked this pull request as ready for review December 19, 2024 14:02
@martinju martinju merged commit d353276 into master Dec 19, 2024
7 checks passed
@martinju martinju deleted the doc_update branch December 19, 2024 14:02
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.

2 participants