A game theoretic approach to explain the output of any machine learning model.
This report summarizes scanner evidence for shap/shap, a Jupyter Notebook project with 25,803 GitHub stars. SynthScan examined 154,207 lines of code across 268 source files, recording 890 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 7.7 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 647 finding(s).
Are imports declared and package/API names verified? 166 finding(s).
Are wrappers, guards, and repeated structures necessary? 501 finding(s).
Which changes need focused human review? 890 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 890 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/_explanation.py | 730 | def _use_data_as_feature_names(self) -> dict[Any, list[Any]]: | CODE |
| LOW | shap/benchmark/metrics.py | 143 | def keep_absolute_mask__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 187 | def remove_absolute_mask__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 231 | def keep_absolute_resample__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 275 | def remove_absolute_resample__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 319 | def keep_absolute_impute__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 363 | def remove_absolute_impute__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 455 | def batch_remove_absolute_retrain__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/metrics.py | 467 | def batch_keep_absolute_retrain__roc_auc(X, y, model_generator, method_name, num_fcounts=11): | CODE |
| LOW | shap/benchmark/methods.py | 56 | def tree_shap_tree_path_dependent(model, data): | CODE |
| LOW | shap/maskers/_text.py | 380 | def post_process_sentencepiece_tokenizer_output(s): | CODE |
| LOW | shap/maskers/_image.py | 171 | def _jit_build_partition_tree(xmin, xmax, ymin, ymax, zmin, zmax, total_ywidth, total_zwidth, M, clustering, q): | CODE |
| LOW | shap/utils/transformers.py | 28 | def parse_prefix_suffix_for_tokenizer(tokenizer): | CODE |
| LOW | shap/utils/_masked_model.py | 176 | # def _build_varying_delta_mask_rows(self, masks): | COMMENT |
| LOW | shap/utils/_masked_model.py | 286 | def _assert_output_input_match(inputs, outputs): | CODE |
| LOW | shap/utils/_masked_model.py | 292 | def _convert_delta_mask_to_full(masks, full_masks): | CODE |
| LOW | shap/utils/_masked_model.py | 313 | def _validate_build_fixed_inputs( | CODE |
| LOW | shap/utils/_legacy.py | 82 | def convert_to_instance_with_index(val, column_name, index_value, index_name): | CODE |
| LOW | shap/models/_topk_lm.py | 113 | def get_output_names_and_update_topk_token_ids(self, X): | CODE |
| LOW | shap/models/_text_generation.py | 206 | def parse_prefix_suffix_for_model_generate_output(self, output): | CODE |
| LOW | shap/models/_teacher_forcing.py | 349 | def get_teacher_forced_logits(self, X, Y): | CODE |
| LOW | shap/explainers/_coalition.py | 349 | def create_partition_hierarchy( | CODE |
| LOW | shap/explainers/_coalition.py | 443 | def _generate_paths_and_combinations(node: Node) -> list[tuple[str, tuple[Any, ...], float]]: | CODE |
| LOW | shap/explainers/_coalition.py | 512 | def _map_combinations_to_unique_masks( | CODE |
| LOW | shap/explainers/_explainer.py | 516 | def supports_model_with_masker(model: Any, masker: Any) -> bool: | CODE |
| LOW | shap/explainers/_linear.py | 355 | def supports_model_with_masker(model: Any, masker: Any) -> bool: | CODE |
| LOW | shap/explainers/_additive.py | 110 | def supports_model_with_masker(model: Any, masker: Any) -> bool: | CODE |
| LOW | shap/explainers/_tree.py | 59 | def _safe_check_tree_instance_experimental(tree_instance: Any) -> None: | CODE |
| LOW | shap/explainers/_tree.py | 539 | def _short_circuit_tree_path_dependent_to_external_shap_calculation( | CODE |
| LOW | shap/explainers/_tree.py | 920 | def _get_shap_interactions_output(self, phi: npt.NDArray[Any], flat_output: bool) -> npt.NDArray[Any]: | CODE |
| LOW | shap/explainers/_tree.py | 966 | def supports_model_with_masker(model: Any, masker: Any) -> bool: | CODE |
| LOW | shap/explainers/_tree.py | 1634 | def _set_xgboost_model_attributes( | CODE |
| LOW | shap/explainers/_tree.py | 2234 | def get_xgboost_dmatrix_properties(model: Any) -> dict[str, Any]: | CODE |
| LOW | shap/explainers/other/_ubjson.py | 167 | def _decode_simple_key_value_pair(fp, key_type): | CODE |
| LOW | shap/explainers/_deep/deep_tf.py | 389 | def execute_with_overridden_gradients(self, f): | CODE |
| LOW | shap/explainers/_deep/deep_tf.py | 688 | def linearity_with_excluded_handler(input_inds, explainer, op, *grads): | CODE |
| LOW | shap/plots/_decision.py | 35 | def __decision_plot_matplotlib( | CODE |
| LOW | shap/plots/_text.py | 1070 | def process_text_to_text_shap_values(shap_values): | STRING |
| LOW | shap/plots/_text.py | 1459 | def unpack_shap_explanation_contents(shap_values): | STRING |
| LOW | shap/plots/_force_matplotlib.py | 303 | def draw_higher_lower_element(out_value, offset_text): | CODE |
| LOW | tests/conftest.py | 87 | def compare_numpy_outputs_against_baseline(*, func_file, baseline_dir=None, rtol=1e-4, atol=1e-6): | CODE |
| LOW | tests/test_explanation.py | 67 | def test_explanation_hstack_errors(random_seed): | CODE |
| LOW | tests/test_explanation.py | 99 | def test_feature_names_slicing_for_square_arrays(random_seed, N): | CODE |
| LOW | tests/test_explanation.py | 130 | def test_populating_op_history(): | CODE |
| LOW | tests/test_explanation.py | 164 | def test_cohorts_invalid_input(inp): | CODE |
| LOW | tests/test_explanation.py | 173 | def test_cohorts_magic_methods(random_seed): | CODE |
| LOW | tests/test_explanation.py | 211 | def test_cohorts_magic_methods_errors(): | CODE |
| LOW | tests/test_explanation.py | 239 | def test_cohorts_generation_with_one_feature(): | CODE |
| LOW | tests/test_install.py | 7 | def test_importing_from_installed_package_not_local_files(): | CODE |
| LOW | tests/maskers/test_composite.py | 9 | def test_composite_masker_init(): | CODE |
| LOW | tests/maskers/test_composite.py | 25 | def test_composite_masker_with_fixed_maskers(): | CODE |
| LOW | tests/maskers/test_composite.py | 40 | def test_composite_masker_shape_method(): | CODE |
| LOW | tests/maskers/test_composite.py | 54 | def test_composite_masker_mask_shapes(): | CODE |
| LOW | tests/maskers/test_composite.py | 69 | def test_composite_masker_data_transform(): | CODE |
| LOW | tests/maskers/test_composite.py | 85 | def test_composite_masker_arg_count_mismatch(): | CODE |
| LOW | tests/maskers/test_composite.py | 101 | def test_composite_masker_call_arg_count_mismatch(): | CODE |
| LOW | tests/maskers/test_composite.py | 114 | def test_composite_masker_clustering(): | CODE |
| LOW | tests/maskers/test_composite.py | 125 | def test_composite_masker_single_masker(): | CODE |
| LOW | tests/maskers/test_composite.py | 138 | def test_composite_masker_three_maskers(): | CODE |
| LOW | tests/maskers/test_composite.py | 153 | def test_composite_with_output_composite(): | CODE |
| 349 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | shap/plots/_text.py | 178 | document._zoom_{uuid} = undefined; | CODE |
| HIGH⚡ | shap/plots/_text.py | 180 | var next_id = undefined; | CODE |
| HIGH⚡ | shap/plots/_text.py | 182 | if (document._zoom_{uuid} !== undefined) {{ | CODE |
| HIGH | shap/plots/_text.py | 202 | if (document._zoom_{uuid} !== undefined) {{ return; }} | CODE |
| HIGH | shap/plots/_text.py | 203 | if (document._hover_{uuid} !== undefined) {{ | CODE |
| HIGH | shap/plots/_text.py | 1317 | var {uuid}_heatmap_flat_state = null; | CODE |
| HIGH | shap/plots/_text.py | 1320 | if ({uuid}_heatmap_flat_state === null) {{ | CODE |
| HIGH | shap/plots/_text.py | 1338 | if ({uuid}_heatmap_flat_state === null) {{ | CODE |
| HIGH | shap/plots/_text.py | 1362 | {uuid}_heatmap_flat_state = null; | CODE |
| HIGH | shap/plots/_text.py | 1365 | if ({uuid}_heatmap_flat_state === null) {{ | CODE |
| HIGH | shap/plots/_text.py | 1448 | if (id === null) {{ | CODE |
| HIGH⚡ | shap/plots/_image.py | 331 | var {uuid}_heatmap_flat_state = null; | CODE |
| HIGH⚡ | shap/plots/_image.py | 335 | if ({uuid}_heatmap_flat_state === null) {{ | CODE |
| HIGH⚡ | shap/plots/_image.py | 342 | if ({uuid}_heatmap_flat_state === null) {{ | CODE |
| HIGH⚡ | shap/plots/_image.py | 344 | {uuid}_update_image_and_overlay(null); | CODE |
| HIGH⚡ | shap/plots/_image.py | 349 | if ({uuid}_heatmap_flat_state === null) {{ | CODE |
| HIGH⚡ | shap/plots/_image.py | 359 | {uuid}_update_image_and_overlay(null); | CODE |
| HIGH⚡ | shap/plots/_image.py | 360 | {uuid}_heatmap_flat_state = null; | CODE |
| HIGH | shap/plots/_image.py | 389 | if (selected_id == null) {{ | CODE |
| HIGH | shap/plots/_image.py | 402 | if ({uuid}_heatmap_flat_state !== null ) {{ | CODE |
| HIGH | shap/plots/_image.py | 453 | dragStart = null; | CODE |
| HIGH | shap/plots/_image.py | 495 | savedTransforms.push(xform.translate(0, 0)); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/datasets.py | 1 | CODE | |
| LOW | shap/__init__.py | 3 | CODE | |
| LOW | shap/__init__.py | 3 | CODE | |
| LOW | shap/__init__.py | 6 | CODE | |
| LOW | shap/__init__.py | 7 | CODE | |
| LOW | shap/__init__.py | 8 | CODE | |
| LOW | shap/__init__.py | 9 | CODE | |
| LOW | shap/__init__.py | 10 | CODE | |
| LOW | shap/__init__.py | 11 | CODE | |
| LOW | shap/__init__.py | 12 | CODE | |
| LOW | shap/__init__.py | 13 | CODE | |
| LOW | shap/__init__.py | 14 | CODE | |
| LOW | shap/__init__.py | 15 | CODE | |
| LOW | shap/__init__.py | 16 | CODE | |
| LOW | shap/__init__.py | 17 | CODE | |
| LOW | shap/__init__.py | 18 | CODE | |
| LOW | shap/__init__.py | 19 | CODE | |
| LOW | shap/__init__.py | 95 | CODE | |
| LOW | shap/__init__.py | 95 | CODE | |
| LOW | shap/__init__.py | 95 | CODE | |
| LOW | shap/__init__.py | 95 | CODE | |
| LOW | shap/__init__.py | 96 | CODE | |
| LOW | shap/__init__.py | 97 | CODE | |
| LOW | shap/__init__.py | 97 | CODE | |
| LOW | shap/__init__.py | 100 | CODE | |
| LOW | shap/__init__.py | 46 | CODE | |
| LOW | shap/links.py | 1 | CODE | |
| LOW | shap/_explanation.py | 1 | CODE | |
| LOW | shap/benchmark/__init__.py | 1 | CODE | |
| LOW | shap/benchmark/__init__.py | 2 | CODE | |
| LOW | shap/benchmark/__init__.py | 3 | CODE | |
| LOW | shap/benchmark/__init__.py | 4 | CODE | |
| LOW | shap/maskers/_fixed.py | 1 | CODE | |
| LOW | shap/maskers/_masker.py | 1 | CODE | |
| LOW | shap/maskers/__init__.py | 1 | CODE | |
| LOW | shap/maskers/__init__.py | 2 | CODE | |
| LOW | shap/maskers/__init__.py | 3 | CODE | |
| LOW | shap/maskers/__init__.py | 4 | CODE | |
| LOW | shap/maskers/__init__.py | 5 | CODE | |
| LOW | shap/maskers/__init__.py | 6 | CODE | |
| LOW | shap/maskers/__init__.py | 7 | CODE | |
| LOW | shap/maskers/__init__.py | 7 | CODE | |
| LOW | shap/maskers/__init__.py | 7 | CODE | |
| LOW | shap/maskers/__init__.py | 8 | CODE | |
| LOW | shap/maskers/_composite.py | 1 | CODE | |
| LOW | shap/utils/_types.py | 1 | CODE | |
| LOW | shap/utils/_clustering.py | 1 | CODE | |
| LOW | shap/utils/_clustering.py | 17 | CODE | |
| LOW | shap/utils/__init__.py | 1 | CODE | |
| LOW | shap/utils/__init__.py | 1 | CODE | |
| LOW | shap/utils/__init__.py | 1 | CODE | |
| LOW | shap/utils/__init__.py | 1 | CODE | |
| LOW | shap/utils/__init__.py | 1 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| 75 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pyproject.toml | 141 | COMMENT | |
| LOW | shap/benchmark/plots.py | 21 | COMMENT | |
| LOW | shap/benchmark/plots.py | 41 | # "keep_negative_mask": { | COMMENT |
| LOW | shap/benchmark/plots.py | 61 | # "xlabel": "Max fraction of features removed", | COMMENT |
| LOW | shap/benchmark/plots.py | 81 | # "sort_order": 9 | COMMENT |
| LOW | shap/benchmark/plots.py | 101 | # "keep_absolute_resample__roc_auc": { | COMMENT |
| LOW | shap/benchmark/plots.py | 121 | # "xlabel": "Max fraction of features removed", | COMMENT |
| LOW | shap/benchmark/plots.py | 141 | # "sort_order": 12 | COMMENT |
| LOW | shap/benchmark/plots.py | 161 | # "batch_keep_absolute__r2": { | COMMENT |
| LOW | shap/benchmark/plots.py | 181 | # }, | COMMENT |
| LOW | shap/benchmark/plots.py | 201 | # "title": "Saabas" | COMMENT |
| LOW | shap/benchmark/plots.py | 541 | "<div style='float: left; font-weight: regular; font-size: 24px; color: #000;'>SHAP Benchmark <span style='font- | COMMENT |
| LOW | shap/benchmark/_sequential.py | 21 | COMMENT | |
| LOW | shap/benchmark/_sequential.py | 121 | # if not hasattr(attributions[0], "__len__"): | COMMENT |
| LOW | shap/maskers/_text.py | 261 | # assert len(clustering)+1 == M | COMMENT |
| LOW | shap/cutils/tabular_utils.h | 1 | #ifndef TABULAR_UTILS_H | COMMENT |
| LOW | shap/cutils/grey_code_utils.h | 1 | #ifndef GREY_CODE_UTILS_H | COMMENT |
| LOW | shap/utils/_masked_model.py | 181 | # self._varying_delta_mask_rows = [] | COMMENT |
| LOW | shap/cext/gpu_treeshap.h | 21 | #include <thrust/iterator/discard_iterator.h> | COMMENT |
| LOW | shap/cext/tree_shap.h | 1 | /** | COMMENT |
| LOW | shap/explainers/_partition.py | 301 | base_value = f00 | COMMENT |
| LOW | shap/explainers/_partition.py | 601 | # #r = self.masker | COMMENT |
| LOW | shap/explainers/_partition.py | 621 | # # output_indexes = np.argsort(np.abs(f11))[:out_len] | COMMENT |
| LOW | shap/explainers/_partition.py | 641 | # owen(fc=0) | COMMENT |
| LOW | shap/explainers/_partition.py | 661 | # while not q.empty() and len(batch_masks) < batch_size and eval_count < max_evals: | COMMENT |
| LOW | shap/explainers/_partition.py | 681 | # self.dvalues[ind] += (f11 - f00) * weight | COMMENT |
| LOW | shap/explainers/_partition.py | 701 | COMMENT | |
| LOW | shap/explainers/_partition.py | 721 | # new_weight /= 2 | COMMENT |
| LOW | shap/explainers/_gradient.py | 401 | # regression model with priors of the coefficients equal to the estimated variances for each | COMMENT |
| LOW | shap/explainers/_kernel.py | 761 | eyAdj2 = eyAdj - self.maskMatrix[:, nonzero_inds[-1]] * ( | COMMENT |
| LOW | shap/explainers/_additive.py | 161 | # data : numpy.array, pandas.DataFrame | COMMENT |
| LOW | shap/explainers/_additive.py | 181 | # self.data = data | COMMENT |
| LOW | shap/explainers/_additive.py | 201 | # X : numpy.array, pandas.DataFrame or scipy.csr_matrix | COMMENT |
| LOW | shap/explainers/_additive.py | 221 | # X = X.values | COMMENT |
| LOW | shap/explainers/pytree.py | 21 | # self.model_type = "xgboost" | COMMENT |
| LOW | shap/explainers/pytree.py | 41 | COMMENT | |
| LOW | shap/explainers/pytree.py | 61 | # return phi[:, 0] | COMMENT |
| LOW | shap/explainers/pytree.py | 81 | # if self.model_type == "xgboost": | COMMENT |
| LOW | shap/explainers/pytree.py | 101 | # def __init__(self, children_left, children_right, children_default, feature, threshold, value, node_sample_weight) | COMMENT |
| LOW | shap/explainers/pytree.py | 121 | # if hasattr(tree, "missing_go_to_left"): | COMMENT |
| LOW | shap/explainers/pytree.py | 321 | COMMENT | |
| LOW | shap/explainers/other/_ubjson.py | 81 | # [d][67.0] | COMMENT |
| LOW | shap/plots/_beeswarm.py | 141 | # out_names = shap_exp.output_names | COMMENT |
| LOW | shap/plots/_beeswarm.py | 221 | raise ValueError(emsg) | COMMENT |
| LOW | shap/plots/_beeswarm.py | 241 | # return beeswarm( | COMMENT |
| LOW | shap/plots/_beeswarm.py | 261 | # slow = -v | COMMENT |
| LOW | shap/plots/_beeswarm.py | 281 | # plt.subplot(1, max_display, i + 1) | COMMENT |
| LOW | shap/plots/colors/_colors.py | 121 | # default_colors = ["#1E88E5", "#ff0d57", "#13B755", "#7C52FF", "#FFC000", "#00AEEF"] | COMMENT |
| LOW | shap/plots/colors/_colorconv.py | 1 | ### ------------ vendored from skimage.color.colorconv ------------- | COMMENT |
| LOW | shap/plots/colors/_colorconv.py | 21 | # may be used to endorse or promote products derived from this software | COMMENT |
| LOW | tests/explainers/test_tree.py | 1501 | ) | COMMENT |
| LOW | tests/explainers/test_tree.py | 1761 | # | COMMENT |
| LOW | tests/plots/test_decision.py | 121 | # import lightgbm as lgb | COMMENT |
| LOW | tests/plots/test_decision.py | 141 | # "max_bin": 512, | COMMENT |
| LOW | tests/plots/test_decision.py | 161 | # shap_interaction_values = explainer.shap_interaction_values(features) | COMMENT |
| LOW | tests/plots/test_decision.py | 181 | # shap.decision_plot(base_value, shap_values[0, :]) | COMMENT |
| LOW | tests/plots/test_decision.py | 201 | # # Now with feature names in the features argument as numpy. | COMMENT |
| LOW | tests/plots/test_decision.py | 221 | # highlight = y_label != (expit(predictions) > 0.5) | COMMENT |
| LOW | tests/plots/test_decision.py | 241 | # shap.decision_plot(alpha=0.2, **args1) | COMMENT |
| LOW | tests/plots/test_decision.py | 261 | # shap.decision_plot(**args2) # to compare with previous plot | COMMENT |
| 35 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/_explanation.py | 966 | CODE | |
| LOW | shap/_explanation.py | 108 | CODE | |
| LOW | shap/_explanation.py | 317 | CODE | |
| LOW | shap/_serializable.py | 70 | CODE | |
| LOW | shap/benchmark/_explanation_error.py | 92 | CODE | |
| LOW | shap/benchmark/plots.py | 386 | CODE | |
| LOW | shap/benchmark/plots.py | 446 | CODE | |
| LOW | shap/benchmark/experiments.py | 266 | CODE | |
| LOW | shap/benchmark/_sequential.py | 88 | CODE | |
| LOW | shap/benchmark/_sequential.py | 216 | CODE | |
| LOW | shap/maskers/_text.py | 111 | CODE | |
| LOW | shap/maskers/_text.py | 177 | CODE | |
| LOW | shap/maskers/_tabular.py | 22 | CODE | |
| LOW | shap/maskers/_image.py | 171 | CODE | |
| LOW | shap/maskers/_image.py | 72 | CODE | |
| LOW | shap/utils/transformers.py | 28 | CODE | |
| LOW | shap/utils/_clustering.py | 154 | CODE | |
| LOW | shap/utils/_masked_model.py | 74 | CODE | |
| LOW | shap/utils/_general.py | 45 | CODE | |
| LOW | shap/utils/_general.py | 73 | CODE | |
| LOW | shap/utils/_general.py | 121 | CODE | |
| LOW | shap/models/_topk_lm.py | 203 | CODE | |
| LOW | shap/models/_text_generation.py | 123 | CODE | |
| LOW | shap/models/_teacher_forcing.py | 266 | CODE | |
| LOW | shap/models/_teacher_forcing.py | 349 | CODE | |
| LOW | shap/actions/_optimizer.py | 12 | CODE | |
| LOW | shap/actions/_optimizer.py | 31 | CODE | |
| LOW | shap/explainers/_coalition.py | 332 | CODE | |
| LOW | shap/explainers/_coalition.py | 481 | CODE | |
| LOW | shap/explainers/_coalition.py | 207 | CODE | |
| LOW | shap/explainers/_explainer.py | 37 | CODE | |
| LOW | shap/explainers/_partition.py | 755 | CODE | |
| LOW | shap/explainers/_partition.py | 283 | CODE | |
| LOW | shap/explainers/_gradient.py | 268 | CODE | |
| LOW | shap/explainers/_gradient.py | 311 | CODE | |
| LOW | shap/explainers/_gradient.py | 576 | CODE | |
| LOW | shap/explainers/_sampling.py | 79 | CODE | |
| LOW | shap/explainers/_linear.py | 495 | CODE | |
| LOW | shap/explainers/_linear.py | 105 | CODE | |
| LOW | shap/explainers/_linear.py | 330 | CODE | |
| LOW | shap/explainers/_linear.py | 428 | CODE | |
| LOW | shap/explainers/_permutation.py | 132 | CODE | |
| LOW | shap/explainers/_kernel.py | 234 | CODE | |
| LOW | shap/explainers/_kernel.py | 371 | CODE | |
| LOW | shap/explainers/_kernel.py | 580 | CODE | |
| LOW | shap/explainers/_kernel.py | 659 | CODE | |
| LOW | shap/explainers/_kernel.py | 713 | CODE | |
| LOW | shap/explainers/_exact.py | 344 | CODE | |
| LOW | shap/explainers/_exact.py | 365 | CODE | |
| LOW | shap/explainers/_exact.py | 120 | CODE | |
| LOW | shap/explainers/_tree.py | 163 | CODE | |
| LOW | shap/explainers/_tree.py | 539 | CODE | |
| LOW | shap/explainers/_tree.py | 1015 | CODE | |
| LOW | shap/explainers/_tree.py | 1676 | CODE | |
| LOW | shap/explainers/_tree.py | 1858 | CODE | |
| LOW | shap/explainers/_tree.py | 2533 | CODE | |
| LOW | shap/explainers/pytree.py | 143 | CODE | |
| LOW | shap/explainers/pytree.py | 168 | CODE | |
| LOW | shap/explainers/other/_maple.py | 154 | CODE | |
| LOW | shap/explainers/other/_treegain.py | 12 | CODE | |
| 28 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | shap/benchmark/metrics.py | 13 | except Exception: | CODE |
| HIGH | shap/benchmark/plots.py | 18 | except ImportError: | CODE |
| HIGH | shap/explainers/_explainer.py | 344 | except Exception: | CODE |
| HIGH | shap/explainers/_gradient.py | 568 | except AttributeError: | CODE |
| HIGH | shap/explainers/_gradient.py | 217 | except Exception: | CODE |
| HIGH | shap/explainers/other/_lime.py | 9 | except ImportError: | CODE |
| HIGH | shap/explainers/_deep/deep_pytorch.py | 267 | except AttributeError: | CODE |
| HIGH | shap/explainers/_deep/deep_pytorch.py | 271 | except AttributeError: | CODE |
| HIGH | shap/explainers/_deep/deep_pytorch.py | 304 | except AttributeError: | CODE |
| HIGH | shap/explainers/_deep/deep_pytorch.py | 90 | except AttributeError: | CODE |
| HIGH | shap/explainers/_deep/deep_pytorch.py | 94 | except AttributeError: | CODE |
| HIGH | shap/plots/_bar.py | 322 | except Exception: | CODE |
| HIGH | shap/plots/_bar.py | 444 | except TypeError: | CODE |
| HIGH | tests/conftest.py | 17 | except ImportError: | CODE |
| HIGH | tests/explainers/test_deep.py | 311 | except ImportError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | shap/explainers/_explainer.py | 0 | determines if this explainer can handle the given model. this is an abstract static method meant to be implemented by ea | STRING |
| HIGH | shap/explainers/_additive.py | 0 | determines if this explainer can handle the given model. this is an abstract static method meant to be implemented by ea | STRING |
| HIGH | shap/explainers/_tree.py | 0 | determines if this explainer can handle the given model. this is an abstract static method meant to be implemented by ea | STRING |
| HIGH | shap/explainers/_partition.py | 0 | explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes). | STRING |
| HIGH | shap/explainers/_linear.py | 0 | explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes). | STRING |
| HIGH | shap/explainers/_permutation.py | 0 | explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes). | STRING |
| HIGH | shap/explainers/_additive.py | 0 | explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes). | STRING |
| HIGH | shap/explainers/_exact.py | 0 | explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes). | STRING |
| HIGH | tests/plots/test_beeswarm.py | 0 | checks that valueerror is raised if the features data matrix has an incompatible shape with the shap_values matrix. | STRING |
| HIGH | tests/plots/test_violin.py | 0 | checks that valueerror is raised if the features data matrix has an incompatible shape with the shap_values matrix. | STRING |
| HIGH | tests/plots/test_summary.py | 0 | checks that valueerror is raised if the features data matrix has an incompatible shape with the shap_values matrix. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | shap/explainers/_coalition.py | 331 | # This function is to encode the dictionary to our specific structure | COMMENT |
| MEDIUM | shap/explainers/pytree.py | 1 | """This module is a pure python implementation of Tree SHAP. | STRING |
| MEDIUM | tests/maskers/test_output_composite.py | 128 | # Create a custom masker that takes 2 arguments | COMMENT |
| MEDIUM | tests/maskers/test_output_composite.py | 159 | # Create a minimal masker without all optional attributes | COMMENT |
| MEDIUM | tests/explainers/test_tree.py | 884 | # Define an objective function for skopt to optimise. | COMMENT |
| MEDIUM | tests/explainers/test_tree.py | 2027 | # Create a SHAP TreeExplainer | COMMENT |
| MEDIUM⚡ | tests/plots/test_force_js.py | 48 | # Create a simple model | COMMENT |
| MEDIUM⚡ | tests/plots/test_force_js.py | 53 | # Create the explainer | COMMENT |
| MEDIUM⚡ | tests/plots/test_force_js.py | 63 | # Create a simple model | COMMENT |
| MEDIUM⚡ | tests/plots/test_force_js.py | 68 | # Create the explainer | COMMENT |
| MEDIUM | docs/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/explainers/_linear.py | 247 | # if we still have some multi-collinearity present then we just add regularization... | COMMENT |
| LOW | shap/explainers/_exact.py | 144 | # if nothing varies then we can just return the expected value as the output and be done with it | COMMENT |
| LOW | shap/plots/_violin.py | 326 | # to ignore it, just set it to the previous y-values (so the area between them will be zero). Not ys | COMMENT |
| LOW | shap/plots/_beeswarm.py | 1038 | # to ignore it, just set it to the previous y-values (so the area between them will be zero). Not ys | COMMENT |
| MEDIUM⚡ | shap/plots/resources/bundle.js | 2 | (()=>{var e={543(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="__lod | CODE |
| MEDIUM⚡ | shap/plots/resources/bundle.js | 2 | (()=>{var e={543(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="__lod | CODE |
| MEDIUM⚡ | docs/artwork/california_dataset.html | 3 | (()=>{var e={486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__" | CODE |
| MEDIUM⚡ | docs/artwork/california_dataset.html | 3 | (()=>{var e={486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__" | CODE |
| MEDIUM⚡ | docs/artwork/california_instance.html | 3 | (()=>{var e={486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__" | CODE |
| MEDIUM⚡ | docs/artwork/california_instance.html | 3 | (()=>{var e={486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__" | CODE |
| MEDIUM⚡ | …iner/Keras LSTM for IMDB Sentiment Classification.html | 12004 | function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a= | CODE |
| LOW⚡ | …iner/Keras LSTM for IMDB Sentiment Classification.html | 12004 | function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a= | CODE |
| MEDIUM⚡ | …iner/Keras LSTM for IMDB Sentiment Classification.html | 12004 | function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a= | CODE |
| LOW | …Intermediate Layer of VGG16 on ImageNet (PyTorch).html | 11886 | <h2 id="Explain-with-local-smoothing">Explain with local smoothing<a class="anchor-link" href="#Explain-with-local-smoot | CODE |
| MEDIUM | javascript/package-lock.json | 9024 | "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/_explanation.py | 524 | except Exception: | CODE |
| LOW | shap/benchmark/metrics.py | 13 | except Exception: | CODE |
| LOW | shap/benchmark/metrics.py | 18 | except Exception: | CODE |
| LOW | shap/maskers/_text.py | 53 | except Exception: | CODE |
| LOW | shap/utils/_legacy.py | 143 | except Exception: | CODE |
| LOW | shap/explainers/_explainer.py | 344 | except Exception: | CODE |
| LOW | shap/explainers/_gradient.py | 80 | except Exception: | CODE |
| LOW | shap/explainers/_gradient.py | 86 | except Exception: | CODE |
| LOW | shap/explainers/_gradient.py | 217 | except Exception: | CODE |
| LOW | shap/explainers/_linear.py | 362 | except Exception: | CODE |
| LOW | shap/explainers/tf_utils.py | 32 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 976 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1431 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1444 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1457 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1471 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1484 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1499 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1509 | except Exception: | CODE |
| LOW | shap/explainers/_deep/__init__.py | 77 | except Exception: | CODE |
| LOW | shap/explainers/_deep/__init__.py | 83 | except Exception: | CODE |
| LOW | shap/plots/_beeswarm.py | 393 | except Exception: | CODE |
| LOW | shap/plots/_beeswarm.py | 805 | except Exception: | CODE |
| LOW | shap/plots/_bar.py | 322 | except Exception: | CODE |
| LOW | tests/datasets_to_cache.py | 66 | except Exception as e: | CODE |
| LOW | tests/datasets_to_cache.py | 77 | except Exception as e: | CODE |
| LOW | tests/explainers/test_tree.py | 233 | except Exception: | CODE |
| LOW | tests/explainers/test_tree.py | 289 | except Exception: | CODE |
| LOW | tests/explainers/test_deep.py | 215 | except Exception: | CODE |
| LOW⚡ | tests/plots/test_force_js.py | 35 | except Exception: | CODE |
| LOW⚡ | tests/plots/test_force_js.py | 38 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | shap/explainers/tf_utils.py | 31 | session = tf.compat.v1.keras.backend.get_session() | CODE |
| CRITICAL | tests/explainers/test_deep.py | 235 | sess = tf.compat.v1.keras.backend.get_session() | CODE |
| CRITICAL | …/user_studies/sickness_scores/static/lib/jquery-min.js | 5 | }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e. | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | CMakeLists.txt | 33 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 35 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 81 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 83 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 113 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 116 | # ============================================================================== | COMMENT |
| MEDIUM | shap/explainers/_additive.py | 157 | # ---------- | COMMENT |
| MEDIUM | shap/explainers/_additive.py | 200 | # ---------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/_explanation.py | 108 | CODE | |
| LOW | shap/models/_model.py | 29 | CODE | |
| LOW | shap/explainers/_deep/deep_tf.py | 387 | CODE | |
| LOW | shap/plots/_heatmap.py | 11 | CODE | |
| LOW | shap/plots/_partial_dependence.py | 31 | CODE | |
| LOW | shap/plots/_violin.py | 25 | CODE | |
| LOW | shap/plots/_decision.py | 212 | CODE | |
| LOW | shap/plots/_force.py | 30 | CODE | |
| LOW | shap/plots/_force.py | 384 | CODE | |
| LOW | shap/plots/_group_difference.py | 7 | CODE | |
| LOW | shap/plots/_beeswarm.py | 40 | CODE | |
| LOW | shap/plots/_beeswarm.py | 521 | CODE | |
| LOW | shap/plots/_image.py | 27 | CODE | |
| LOW | shap/plots/_scatter.py | 23 | CODE | |
| LOW | shap/plots/_scatter.py | 517 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/__init__.py | 103 | __all__ = [ | CODE |
| LOW | shap/benchmark/__init__.py | 9 | __all__ = ["ComputeTime", "ExplanationError", "BenchmarkResult", "SequentialMasker"] | CODE |
| LOW | shap/maskers/__init__.py | 10 | __all__ = [ | CODE |
| LOW | shap/utils/__init__.py | 25 | __all__ = [ | CODE |
| LOW | shap/models/__init__.py | 7 | __all__ = [ | CODE |
| LOW | shap/actions/__init__.py | 3 | __all__ = ["Action"] | CODE |
| LOW | shap/explainers/__init__.py | 28 | __all__ = [ | CODE |
| LOW | shap/explainers/other/__init__.py | 7 | __all__ = [ | CODE |
| LOW | shap/plots/_style.py | 96 | def set_style(_style: StyleConfig | None = None, /, **options: Unpack[StyleOptions]) -> None: | CODE |
| LOW | shap/plots/__init__.py | 24 | __all__ = [ | CODE |
| LOW | shap/plots/colors/__init__.py | 17 | __all__ = [ | CODE |
| LOW | tests/plots/test_image.py | 8 | def set_reproducible_mpl_rcparams() -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/explainers/_coalition.py | 242 | # Step 1: build the hierarchy | COMMENT |
| LOW | shap/explainers/_coalition.py | 259 | # Step 2: Compute model results for all unique masks | COMMENT |
| LOW⚡ | shap/explainers/_coalition.py | 270 | # Step 3: Compute marginals for permutations | COMMENT |
| LOW⚡ | shap/explainers/_coalition.py | 277 | # Step 4: Implement Owen values weighting | COMMENT |
| LOW | shap/explainers/_coalition.py | 298 | # Step 5: Return results | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/explainers/_coalition.py | 242 | # Step 1: build the hierarchy | COMMENT |
| LOW | shap/explainers/_coalition.py | 259 | # Step 2: Compute model results for all unique masks | COMMENT |
| LOW⚡ | shap/explainers/_coalition.py | 270 | # Step 3: Compute marginals for permutations | COMMENT |
| LOW⚡ | shap/explainers/_coalition.py | 277 | # Step 4: Implement Owen values weighting | COMMENT |
| LOW | shap/explainers/_coalition.py | 298 | # Step 5: Return results | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | shap/plots/resources/bundle.js | 2 | (()=>{var e={543(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="__lod | CODE |
| LOW⚡ | docs/artwork/california_dataset.html | 3 | (()=>{var e={486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__" | CODE |
| LOW⚡ | docs/artwork/california_instance.html | 3 | (()=>{var e={486:function(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__" | CODE |
| LOW | …notebooks/Census income classification with Keras.html | 11831 | "ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"T | CODE |
| LOW | …s/notebooks/Iris classification with scikit-learn.html | 11837 | "ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"T | CODE |
| LOW | …iner/Keras LSTM for IMDB Sentiment Classification.html | 11990 | var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=f | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | shap/utils/image.py | 39 | # Check if empty or not | COMMENT |
| LOW | .github/workflows/run_tests.yml | 125 | # Set DYLD_LIBRARY_PATH to avoid OpenMP conflicts, see https://github.com/unit8co/darts/pull/3050 | COMMENT |
| LOW | .github/workflows/build_wheels.yml | 122 | # Set DYLD_LIBRARY_PATH to avoid OpenMP conflicts, see https://github.com/unit8co/darts/pull/3050 | COMMENT |
| LOW | .github/workflows/test_js.yml | 32 | # Check if the built bundle matches the committed bundle (ignoring whitespace) | COMMENT |