Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API: factor out abstract base class
ModelInspector
from `LearnerIns…
…pector`, and introduce new `FunctionInspector` (#352) * DOC: update installation instructions in README.rst * BUILD: update code quality checker versions * FIX: LearnerInspector.fit() argument is positional-only * API: support new @fitted_only decorator introduced in pytools 2.1 * FIX: fix import statements for pytools.fit * REFACTOR: separate ShapCalculator and LearnerShapCalculator * REFACTOR: pull methods from LearnerInspector up to ModelInspector * API: move SHAP calculators to packages .shap and .shap.learner * API: rename facet.inspection.shap.learner to ….sklearndf * API: add ShapCalculator.preprocess_features() * API: push _calculate_shap() up to class ShapCalculator * BUILD: require pytools~=2.1rc for mypy * REFACTOR: pull up _convert_shap_tensors_to_list to ShapCalculator * BUILD: require pytools >= 2.1rc * REFACTOR: declare type aliases using TypeAlias * DOC: add missing docstrings * API: remove obsolete constants from ShapCalculator * API: use generic type for arg model of ExplainerFactory.make_explainer() * REFACTOR: replace T_LearnerDF with T_SupervisedLearnerDF in simulators * API: remove dependence of ShapCalculator on class Sample * API: implement new property output_names of class EstimatorDF * FIX: restore support for sample weights in ShapGlobalExplainer * REFACTOR: eliminate a redundant local variable * API: require SupervisedLearnerPipelineDF for LearnerInspector * BUILD: require sklearndf~=2.2.dev for mypy * API: accept pandas series for arg X in fit, predict, … * TEST: make OneHotEncoderDF sparse in simple_preproessor() * IDE: use facet-base environment in all modules * API: add _EstimatorPipelineDF.preprocess(); remove .feature_names_… * API: adapt CandidateEstimatorDF for new ClassifierDF._get_classes() * API: shift feature preprocessing from ShapCalculator to LearnerInspector * API: pull _calculate_shap up to class ShapCalculator * REFACTOR: change _get_shap(…) to _calculate_shap(…, _get_explainer(…)) * API: add method ShapCalculator.validate_features() * API: add method ShapCalculator._reset_fit() * API: remove ShapCalculator.features_ * API: remove ShapCalculator.get_feature_names() * API: unify …output… methods to get_output_names() * API: pull up get_shap…_values() and get_diagonals() to ShapCalculator * API: change the ShapCalculator.get_… methods into properties * API: eliminate classes Shap…ValuesCalculator * API: eliminate classes (Classifier|Regressor)…ValuesCalculator * API: support sklearn not sklearndf in shap calculators & expl. factory * API: pull up LearnerInspector.fit() to ModelInspector * API: rename ModelInspector.…names_ properties to …names, provide pre-fit * API: remove obsolete Shap…Explainer classes * API: rename _learner_inspector.py to _model_inspector.py * API: move class LearnerInspector to new file _learner_inspector.py * FIX: fix mypy checks * FIX: make _get_classes() a method, not a property * FIX: fix mypy checks * BUILD: make conda environment creation more verbose * BUILD: increase timeout for the pytest job * BUILD: use more recent versions in environment.yml * BUILD: update to latest conda before building the environment * BUILD: use more specific versions in environment.yml * BUILD: use more specific versions in environment.yml * TEST: move from Boston to California dataset * BUILD: downgrade scikit-learn to 1.1 to make unit tests work * BUILD: remove debug logging from `conda env create` * BUILD: don't update conda (not needed) * BUILD: upgrade scikit-learn to 1.2 * API: only issue a warning if rv_frozen cannot be determined * FIX: replace deprecated .iteritems() with .items() * API: implement FunctionInspector; support exact & permutation explainers * API: add full support for shap's old and new explainer APIs * BULD: remove support for shap<0.36 * BULD: remove support for shap<0.39 * TEST: restore compatibility with min matrix test * TEST: inline single use of function validate_linkage() * FIX: remove contravariant from `T_Model` (#361) * FIX: remove contravariant from T_Model * REFACTOR: further simplify use of generic types in explainer factories --------- Co-authored-by: j-ittner <ittner.jan@bcg.com> * DOC: fix an outdated docstring --------- Co-authored-by: Mateusz Sokół <mat646@gmail.com> Co-authored-by: Mateusz Sokół <8431159+mtsokol@users.noreply.github.com>
- Loading branch information