Bugfix in `prepare_data()` related to vector of approaches. When usin… (#356)
* Bugfix in `prepare_data()` related to vector of approaches. When using several approaches the old version only used the first approach. Verified this by adding a print in each prepare_data.approach() function and saw that only the first approach in internal$parameters$approach was used.
Can maybe remove code comments before pull request is accepted. Maybe a better method to get the approach?
Also updated roxygen2 for the function, as it seemed that it was reflecting the old version of shapr(?) due to arguments which are no longer present.
However, one then get a warning when creating the roxygen2 documentation. Discuss some solutions as comments below. Discuss with Martin.
* Fixed bug. All messages says "n_combinations is larger than or equal to 2^m", but all the test only tested for "larger than". I.e., if the user specified n_combinations = 2^m in the call to shapr::explain, the function would not treat it as exact.
* Added script demonstrating the bug that shapr does not enter the exact mode when `n_combinations = 2^m`, before the bugfix.
* Added (tentative) test that checks that shapr enters exact mode when `n_combinations >= 2^m`. Remove the large comment after discussing that with Martin.
* Fixed lint warnings in `approach.R`.
* styler
* minor edits to tests
* simplifies comment
* comb files ok
* Updated bug in independence approach related to categorical features which caused shapr to crash later. Added comments when I debuged to understand what was going on. I have added some comments about some stuff I did no understand/agree with. Discuss with Martin and correct this before merge.
* lint warning
* updated test files after accepting new values
* adjustments to comments and Lars' TODO-comments
* update snapshot file after weight adjustment
* cleaned up doc
* rerun doc
* style
---------
Co-authored-by:
Martin <jullum@nr.no>
Loading
Please sign in to comment