NorskRegnesentral / shapr

Explaining the output of machine learning models with more accurately estimated Shapley values
https://norskregnesentral.github.io/shapr/
Other
141 stars 33 forks source link

Annabelle/timeseries approach #314

Closed aredelmeier closed 2 years ago

aredelmeier commented 2 years ago

Adding time series method.

Example script to run is called inst/time_series_annabelle.R which also shows how to simulate somewhat realistic time series data.

This PR implements the method from the groupShapley_paper_experiments branch and now returns the same Shapley values as this branch.

This approach takes in two parameters: timeseries.fixed_sigma_vec (same as empirical approach) and timeseries.bounds (optional) upper and lower bounds to foor/ceiling the sampled time series data.

I apologize for the terrible commit messages but I was going back and forth between the two branches to try to get the same Shapley values.

martinju commented 2 years ago

I think we can just go ahead and merge this.