erroranalysis 0.5.3__tar.gz → 0.5.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- erroranalysis-0.5.4/MANIFEST.in +2 -0
- {erroranalysis-0.5.3/erroranalysis.egg-info → erroranalysis-0.5.4}/PKG-INFO +2 -2
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/error_correlation_methods/gbm.py +8 -3
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/version.py +1 -1
- {erroranalysis-0.5.3 → erroranalysis-0.5.4/erroranalysis.egg-info}/PKG-INFO +2 -2
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis.egg-info/SOURCES.txt +1 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis.egg-info/requires.txt +1 -1
- erroranalysis-0.5.4/requirements-object-detection.txt +1 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/requirements.txt +1 -1
- erroranalysis-0.5.3/MANIFEST.in +0 -1
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/LICENSE +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/README.md +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/cohort_filter.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/constants.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/error_analyzer/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/error_report/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/matrix_filter.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/metrics.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/process_categoricals.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/surrogate_error_tree.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/utils.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/version_checker.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/analyzer/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/analyzer/error_analyzer.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/error_correlation_methods/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/error_correlation_methods/ebm.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/report/__init__.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/report/error_report.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis.egg-info/dependency_links.txt +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis.egg-info/top_level.txt +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/setup.cfg +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/setup.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_cohort_filter.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_error_report.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_importances.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_matrix_filter.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_metrics.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_pyspark_surrogate_error_tree.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_root_stats.py +0 -0
- {erroranalysis-0.5.3 → erroranalysis-0.5.4}/tests/test_surrogate_error_tree.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: erroranalysis
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
4
4
|
Summary: Core error analysis APIs
|
|
5
5
|
Home-page: https://github.com/microsoft/responsible-ai-widgets
|
|
6
6
|
Author: Roman Lutz, Ilya Matiach, Ke Xu
|
|
@@ -21,7 +21,7 @@ Requires-Dist: pandas<2.0.0,>=0.25.1
|
|
|
21
21
|
Requires-Dist: scipy>=1.4.1
|
|
22
22
|
Requires-Dist: scikit-learn>=0.22.1
|
|
23
23
|
Requires-Dist: lightgbm>=2.0.11
|
|
24
|
-
Requires-Dist: raiutils>=0.4.
|
|
24
|
+
Requires-Dist: raiutils>=0.4.2
|
|
25
25
|
Provides-Extra: object-detection
|
|
26
26
|
Requires-Dist: vision_explanation_methods; extra == "object-detection"
|
|
27
27
|
|
|
@@ -12,8 +12,8 @@ from erroranalysis._internal.constants import ModelTask
|
|
|
12
12
|
|
|
13
13
|
def compute_gbm_global_importance(input_data, diff, model_task,
|
|
14
14
|
categorical_indexes):
|
|
15
|
-
"""Compute global importance score for
|
|
16
|
-
:param input_data: The input data to compute the
|
|
15
|
+
"""Compute global importance score for GBM between the features and error.
|
|
16
|
+
:param input_data: The input data to compute the GBM global importance
|
|
17
17
|
score on.
|
|
18
18
|
:type input_data: numpy.ndarray
|
|
19
19
|
:param diff: The difference between the label and prediction
|
|
@@ -21,7 +21,7 @@ def compute_gbm_global_importance(input_data, diff, model_task,
|
|
|
21
21
|
:type diff: numpy.ndarray
|
|
22
22
|
:param model_task: The model task.
|
|
23
23
|
:type model_task: str
|
|
24
|
-
:return: The computed
|
|
24
|
+
:return: The computed GBM global importance score between the features and
|
|
25
25
|
error.
|
|
26
26
|
:rtype: list[float]
|
|
27
27
|
"""
|
|
@@ -33,6 +33,11 @@ def compute_gbm_global_importance(input_data, diff, model_task,
|
|
|
33
33
|
model.fit(input_data, diff, categorical_feature=categorical_indexes)
|
|
34
34
|
explainer = shap.TreeExplainer(model)
|
|
35
35
|
shap_values = explainer.shap_values(input_data)
|
|
36
|
+
dims = np.shape(shap_values)
|
|
37
|
+
# fix some inconsistencies in the shape of the shap_values
|
|
38
|
+
# for newer versions of shap>=0.45.0 for single-valued target column
|
|
39
|
+
if is_classification and len(dims) == 2:
|
|
40
|
+
shap_values = np.expand_dims(shap_values, axis=0)
|
|
36
41
|
shap_mean_abs = np.abs(shap_values).mean(axis=0)
|
|
37
42
|
if is_classification:
|
|
38
43
|
shap_mean_abs = shap_mean_abs.mean(axis=0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: erroranalysis
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
4
4
|
Summary: Core error analysis APIs
|
|
5
5
|
Home-page: https://github.com/microsoft/responsible-ai-widgets
|
|
6
6
|
Author: Roman Lutz, Ilya Matiach, Ke Xu
|
|
@@ -21,7 +21,7 @@ Requires-Dist: pandas<2.0.0,>=0.25.1
|
|
|
21
21
|
Requires-Dist: scipy>=1.4.1
|
|
22
22
|
Requires-Dist: scikit-learn>=0.22.1
|
|
23
23
|
Requires-Dist: lightgbm>=2.0.11
|
|
24
|
-
Requires-Dist: raiutils>=0.4.
|
|
24
|
+
Requires-Dist: raiutils>=0.4.2
|
|
25
25
|
Provides-Extra: object-detection
|
|
26
26
|
Requires-Dist: vision_explanation_methods; extra == "object-detection"
|
|
27
27
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
vision_explanation_methods
|
erroranalysis-0.5.3/MANIFEST.in
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
include requirements.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/error_analyzer/__init__.py
RENAMED
|
File without changes
|
{erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/_internal/error_report/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{erroranalysis-0.5.3 → erroranalysis-0.5.4}/erroranalysis/error_correlation_methods/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|