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

API: run LearnerRanker using single model instead of CrossFit #317

Merged
merged 125 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
c30791b
API: remove custom blank line at end of simulation output
j-ittner Sep 20, 2021
8529981
API: return LearnerInspector matrix outputs as Matrix instances
j-ittner Sep 20, 2021
acbe4c3
API: move class LinkageTree to module pytools.data
j-ittner Sep 20, 2021
11060f0
TEST: update unit tests for new Matrix class
j-ittner Sep 20, 2021
46f1b2a
API: annotate affinity matrices with weights and axis labels
j-ittner Sep 20, 2021
5f7a6c0
API: feature/dependent feature --> primary feature/associated feature
j-ittner Sep 22, 2021
f67a339
VIZ: set color of axis labels to foreground color
j-ittner Sep 22, 2021
b0392d0
Merge branch '2.0.x' into api/drawer_style_redesign
j-ittner Sep 22, 2021
c0880d3
DOC: update release notes
j-ittner Sep 23, 2021
5cace36
API: order feature linkage leaves for minimal neighbour distance
j-ittner Sep 23, 2021
fb855b8
Merge branch '2.0.x' into api/drawer_style_redesign
j-ittner Sep 24, 2021
15a3a22
API: rename Matrix.data to .values, and .weight_label to .value_label
j-ittner Sep 27, 2021
cf35f89
TEST: support NAN values in print_expected_matrix() helper function
j-ittner Oct 6, 2021
3b23ab4
API: set diagonals of affinity matrices to np.nan
j-ittner Oct 6, 2021
06f87bd
API: return Matrix instances from feature_interaction_matrix()
j-ittner Oct 6, 2021
bebad34
REFACTOR: rename __feature_matrix_to_df to __arrays_to_matrix
j-ittner Oct 6, 2021
c8f0488
REFACTOR: import scipy modules instead of individual functions
j-ittner Oct 6, 2021
4e04a9e
DOC: update release notes
j-ittner Oct 6, 2021
df7d7c7
DOC: correct typos and glitches in release notes
j-ittner Oct 6, 2021
3848483
DOC: tweak release notes
j-ittner Oct 6, 2021
8af3d52
Merge branch '2.0.x' into api/drawer_style_redesign
j-ittner Oct 15, 2021
b782d7d
API: run LearnerInspector on full sample instead of crossfit splits
j-ittner Oct 17, 2021
564227d
REFACTOR: simplify signature of ShapCalculator._calculate_shap()
j-ittner Oct 17, 2021
45d49eb
REFACTOR: use sklearn.base.is_classifier to check for classifier
j-ittner Oct 18, 2021
bdc9f18
FIX: return type of make_explainer is BaseExplainer
j-ittner Oct 18, 2021
ed6ee60
REFACTOR: use triple quotes for arg match of @inheritdoc
j-ittner Oct 18, 2021
27848c1
REFACTOR: eliminate inner function make_explainer
j-ittner Oct 18, 2021
b4a97c5
API: make explainer factory arguments keyword-only
j-ittner Oct 18, 2021
81615cb
API: rename TreeExplainerFactory arg use_background_dataset to uses_…
j-ittner Oct 18, 2021
8e590f6
API: base class ExplainerFactory on HasExpressionRepr
j-ittner Oct 18, 2021
57bbde0
API: state explainer when warning about ignoring shap_interaction=True
j-ittner Oct 18, 2021
7419c2b
API: introduce class ParallelExplainer
j-ittner Oct 18, 2021
e52b5b4
API: make arg max_job_size required in ExplainerQueue
j-ittner Oct 18, 2021
4875d65
REFACTOR: simplify access of BaseExplainer.shap_interaction_values()
j-ittner Oct 18, 2021
09dfd13
REFACTOR: push binary classif. handling down to ClassifierShapCalculator
j-ittner Oct 18, 2021
b0a60bb
API: run simulations on full sample instead of crossfit splits
j-ittner Oct 19, 2021
bd0f0ef
API: simplify UnivariateSimulationResult API; simplify simulator classes
j-ittner Oct 19, 2021
7e224e5
API: simulate partitions in parallel
j-ittner Oct 19, 2021
4aa64b9
DOC: update simulation docstrings
j-ittner Oct 19, 2021
ae0e1f2
FIX: remove references to removed attribute LearnerInspector.crossfit
j-ittner Oct 19, 2021
202a9a8
FIX: remove obsolete arg `aggregation` from feature_…_matrix methods
j-ittner Oct 19, 2021
25f7cd8
DOC: remove references to crossfit from LearnerInspector documentation
j-ittner Oct 19, 2021
8abb7ae
TEST: remove LearnerCrossfit from learner inspector unit tests
j-ittner Oct 19, 2021
96898b9
TEST: remove obsolete helper functions
j-ittner Oct 19, 2021
9e03768
Merge branch '2.0.x' into api/drawer_style_redesign
j-ittner Oct 19, 2021
fbf0fab
Merge branch 'api/drawer_style_redesign' into api/no_xfit_learner_ins…
j-ittner Oct 19, 2021
23d1aba
Merge branch 'api/drawer_style_redesign' into api/no_xfit_simulation
j-ittner Oct 19, 2021
2959aef
Merge branch '2.0.x' into api/no_xfit_simulation
j-ittner Oct 19, 2021
453bb54
Merge branch '2.0.x' into api/no_xfit_learner_inspector
j-ittner Oct 19, 2021
4587266
Merge branch 'api/no_xfit_simulation' into api/no_xfit_learner_ranker
j-ittner Oct 19, 2021
f118803
TEST: replace iris_classifier_model_binary by iris_classifier_binary
j-ittner Oct 19, 2021
b2c6635
TEST: remove obsolete fixture iris_classifier_crossfit_binary
j-ittner Oct 22, 2021
202d754
TEST: use strings not pandas indices to select ColumnTransformer columns
j-ittner Oct 22, 2021
466afe2
API: implement class ParameterSpace and related classes
j-ittner Nov 9, 2021
5398ed0
Merge branch '2.0.x' into api/no_xfit_learner_ranker
j-ittner Nov 9, 2021
95ec39f
add initial version of CrossFit-free LearnerRanker
j-ittner Jan 19, 2022
6dcc9cc
Merge branch '2.0.x' into api/no_xfit_learner_ranker
j-ittner Jan 20, 2022
c76704f
API: provide all univariate simulation results as a data frame
j-ittner Jan 20, 2022
c34dce8
API: refer to simulation results as mean simulated outputs, not median
j-ittner Jan 20, 2022
641d30a
DEV: get shap module from conda instead of pypi to avoid numpy conflict
j-ittner Jan 20, 2022
6b444da
Merge branch '2.0.x' into api/no_xfit_simulation
j-ittner Jan 20, 2022
33826bc
Merge branch 'api/no_xfit_simulation' into api/no_xfit_learner_ranker
j-ittner Jan 20, 2022
2c7bfa6
Merge branch '2.0.x' into api/no_xfit_learner_inspector
j-ittner Jan 20, 2022
e07d371
FIX: Set return signature of ShapProjector._calculate to None
j-ittner Jan 20, 2022
5bebc10
FIX: replace iris_classifier_model_binary with iris_classifier_binary
j-ittner Jan 20, 2022
fd9408f
API: remove previous LearnerRanker
mtsokol Jan 21, 2022
50a5bf8
API: enable tests for new LearnerRanker
mtsokol Jan 21, 2022
c0b8017
REFACTOR: remove obsolete function _learner_type()
j-ittner Jan 21, 2022
0fb3f81
REFACTOR: rename LearnerRanker2 to LearnerRanker
j-ittner Jan 21, 2022
38243e8
REFACTOR: remove classes LearnerGrid and LearnerEvaluation
j-ittner Jan 21, 2022
c737382
Merge branch '2.0.x' into api/no_xfit_learner_inspector
j-ittner Jan 24, 2022
ffd71ec
Merge branch 'api/no_xfit_learner_inspector' into api/no_xfit_learner…
j-ittner Jan 24, 2022
a68b3a4
Merge pull request #318 from BCG-Gamma/api/no_xfit_learner_ranker_tests
mtsokol Jan 24, 2022
266d79e
API: set default candidate to None
mtsokol Jan 24, 2022
282ad4e
API: add unlift method to ParameterSpace
mtsokol Jan 25, 2022
7fb1584
API: introduce CandidateEstimatorDF
mtsokol Jan 27, 2022
a2eb45b
API: rename candidate to raw_estimator
mtsokol Jan 27, 2022
9a62324
API: add scoring preprocessing
mtsokol Jan 27, 2022
77fa9a3
API: refactor CandidateEstimatorDF
mtsokol Jan 29, 2022
f6b2165
API: introduce name parameter
mtsokol Feb 1, 2022
4eef0a4
API: expect EstimatorDF arguments for BaseParameterSpace
j-ittner Feb 2, 2022
6424407
API: remove MultiRegressorParameterSpace, MultiClassifierParameterSpace
j-ittner Feb 2, 2022
751a404
API: add T_Candidate_co; update (Multi)ParamaterSpace class signatures
j-ittner Feb 2, 2022
8452f02
API: add PARAM_CANDIDATE… constants to CandidateEstimatorDF
j-ittner Feb 2, 2022
bce28b8
API: add documentation for CandidateEstimatorDF attributes
j-ittner Feb 2, 2022
dc3ebe0
API: add call to super().__init__()
j-ittner Feb 2, 2022
2b8311a
API: suppress PEP warnings for 'X' arg name
j-ittner Feb 2, 2022
91429fa
API: add property CandidateEstimatorDF._estimator_type
j-ittner Feb 2, 2022
be4d3b7
DOC: tweak API docstring
j-ittner Feb 2, 2022
07eba48
API: streamline/improve handling of estimator scoring in LearnerRanker
j-ittner Feb 2, 2022
83de5a6
FIX: typo in exception message
j-ittner Feb 2, 2022
7821c24
TEST: update unit tests for API changes
j-ittner Feb 2, 2022
f1709e3
API: remove obsolete constants ParamaterSpace.STEP_…
j-ittner Feb 2, 2022
132f098
API: don't use CandidateEstimatorDF in ParameterSpace; add auto-naming
j-ittner Feb 3, 2022
46ca063
API: add type validation for LearnerRanker parameter searcher_factory
j-ittner Feb 3, 2022
d32f0eb
DOC: tweak a docstring
j-ittner Feb 3, 2022
b6dfee1
TEST: streamline and update unit tests
j-ittner Feb 3, 2022
8e1f46a
TEST: eliminate test_crossfit.py
j-ittner Feb 3, 2022
fde8657
DEBUG: remove a debug message
j-ittner Feb 3, 2022
6bdd51c
Merge pull request #320 from BCG-Gamma/api/no_xfix_estimator_candidate
j-ittner Feb 3, 2022
02d02fc
API: remove module facet.crossfit
j-ittner Feb 3, 2022
7991b58
API: rename LearnerRanker param searcher_factory to searcher_type
j-ittner Feb 3, 2022
968e5f1
API: eliminate LearnerRanker parameter random_state
j-ittner Feb 3, 2022
c14272b
DOC: add docstrings for LearnerRanker attributes
j-ittner Feb 3, 2022
3392b07
DOC: tweak a docstring
j-ittner Feb 3, 2022
1a3216e
Merge branch '2.0.x' into api/no_xfit_learner_ranker
j-ittner Feb 3, 2022
b88aa9d
DOC: update release notes
j-ittner Feb 3, 2022
43a7c6c
FIX: honour arg prefix in MultiEstimatorParameterSpace.get_parameters()
j-ittner Feb 15, 2022
c79b53f
FIX: improve type hints of class CandidateEstimatorDF
j-ittner Feb 15, 2022
ec7f525
REFACTOR: tweak approach to get BaseSearchCV class
j-ittner Feb 15, 2022
33c0989
DOC: update docstrings
j-ittner Feb 15, 2022
2ddfebe
REFACTOR: reorder constants for better code legibility
j-ittner Feb 15, 2022
9176757
API: support all estimators in LearnerRanker, not just learner pipelines
j-ittner Feb 15, 2022
0a2e99f
DOC: add comments
j-ittner Feb 15, 2022
7414691
DOC: update docstrings
j-ittner Feb 15, 2022
50f0a34
API: remove CandidateEstimatorDF.empty()
j-ittner Feb 15, 2022
b897d26
DEBUG: add message to an assert statement
j-ittner Feb 15, 2022
380b161
DOC: tweak release notes
j-ittner Feb 15, 2022
9442ae2
API: rename LearnerRanker to ModelSelector
j-ittner Feb 15, 2022
c406b28
API: move CandidateEstimatorDF to facet.selection.base
j-ittner Feb 15, 2022
8cb05f7
DOC: tweak a docstring
j-ittner Feb 15, 2022
4eb2991
DOC: update the pydata sphinx theme to ~=0.7
j-ittner Feb 16, 2022
1a9679a
DOC: tweak docstrings
j-ittner Feb 16, 2022
514efcb
TEST: rename _ranker to _selector
j-ittner Feb 16, 2022
4c81321
DOC: tweak release notes
j-ittner Feb 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 38 additions & 5 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ FACET 2.0
2.0.0
~~~~~

``facet.data``
^^^^^^^^^^^^^^

- API: class :class:`.RangePartitioner` supports new optional arguments ``lower_bound``
and ``upper_bound`` in method :meth:`~.RangePartitioner.fit` and no longer accepts
them in the class initializer

``facet.inspection``
^^^^^^^^^^^^^^^^^^^^

- API: :class:`.LearnerInspector` no longer uses learner crossfits and instead inspects
models using a single pass of SHAP calculations, usually leading to performance gains
of up to a factor of 50
- API: return :class:`.LearnerInspector` matrix outputs as :class:`.Matrix` instances
- API: diagonals of feature synergy, redundancy, and association matrices are now
``nan`` instead of 1.0
Expand All @@ -15,14 +28,34 @@ FACET 2.0
row and column order of :class:`.Matrix` objects returned by the corresponding
``feature_…_matrix`` methods of :class:`.LearnerInspector`, minimizing the distance
between adjacent leaves
The old sorting behaviour of FACET 1.x can be restored using method
The old sorting behaviour of FACET 1 can be restored using method
:meth:`.LinkageTree.sort_by_weight`
- API: class :class:`.RangePartitioner` adds optional arguments ``lower_bound`` and
``upper_bound`` to method :meth:`~.RangePartitioner.fit` and no longer accepts them
in the class initializer

``facet.selection``
^^^^^^^^^^^^^^^^^^^

- API: :class:`.ModelSelector` replaces FACET 1 class ``LearnerRanker``, and now
supports any CV searcher that supports `scikit-learn`'s CV search API, including
`scikit-learn`'s native searchers such as :class:`.GridSearchCV` or
:class:`.RandomizedSearchCV`
- API: new classes :class:`.ParameterSpace` and :class:`MultiParameterSpace` offer an
a more convenient and robust mechanism for declaring options or distributions for
hyperparameter tuning

``facet.simulation``
^^^^^^^^^^^^^^^^^^^^

- API: simulations no longer depend on learner crossfits and instead are carried out
as a single pass on the full dataset, using the *standard error of mean predictions*
to obtain confidence intervals that less conservative yet more realistic
- VIZ: minor tweaks to simulation plots and reports generated by
:class:`.SimulationDrawer`

Other
^^^^^

- API: class ``LearnerCrossfit`` is no longer used in FACET 2 and has been removed


FACET 1.2
---------
Expand Down Expand Up @@ -93,7 +126,7 @@ by the :class:`.LearnerInspector`.
across matrices as an indication of confidence for each calculated value.
- API: Method :meth:`.LearnerInspector.shap_plot_data` now returns SHAP values for the
positive class of binary classifiers.
- API: Increase efficiency of :class:`.LearnerRanker` parallelization by adopting the
- API: Increase efficiency of :class:`.ModelSelector` parallelization by adopting the
new :class:`pytools.parallelization.JobRunner` API provided by :mod:`pytools`
- BUILD: add support for :mod:`shap` 0.38 and 0.39

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies:
- m2r ~= 0.2
- pluggy ~= 0.13
- pre-commit ~= 2.7
- pydata-sphinx-theme ~= 0.4.0
- pydata-sphinx-theme ~= 0.7
- pytest ~= 5.2
- pytest-cov ~= 2.8
- pyyaml ~= 5.1
Expand Down
12 changes: 0 additions & 12 deletions src/facet/crossfit/__init__.py

This file was deleted.

Loading