A game theoretic approach to explain the output of any machine learning model.
This report presents the forensic synthetic code analysis of shap/shap, a Jupyter Notebook project with 25,607 GitHub stars. SynthScan v2.0 examined 151,479 lines of code across 249 source files, recording 859 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 7.3 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 859 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| 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 | 175 | 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/_clustering.py | 101 | def _reverse_window_score_gain( | CODE |
| LOW | shap/utils/_masked_model.py | 171 | # def _build_varying_delta_mask_rows(self, masks): | COMMENT |
| LOW | shap/utils/_masked_model.py | 281 | def _assert_output_input_match(inputs, outputs): | CODE |
| LOW | shap/utils/_masked_model.py | 287 | def _convert_delta_mask_to_full(masks, full_masks): | CODE |
| LOW | shap/utils/_masked_model.py | 352 | def _build_fixed_single_output( | CODE |
| LOW | shap/utils/_masked_model.py | 377 | def _build_fixed_multi_output( | 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/_exact.py | 245 | def _compute_grey_code_row_values_st( | CODE |
| LOW | shap/explainers/_tree.py | 59 | def _safe_check_tree_instance_experimental(tree_instance: Any) -> None: | CODE |
| LOW | shap/explainers/_tree.py | 880 | def _get_shap_interactions_output(self, phi: npt.NDArray[Any], flat_output: bool) -> npt.NDArray[Any]: | CODE |
| LOW | shap/explainers/_tree.py | 926 | def supports_model_with_masker(model: Any, masker: Any) -> bool: | CODE |
| LOW | shap/explainers/_tree.py | 1594 | def _set_xgboost_model_attributes( | CODE |
| LOW | shap/explainers/_tree.py | 2194 | 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 | 397 | def execute_with_overridden_gradients(self, f): | CODE |
| LOW | shap/explainers/_deep/deep_tf.py | 696 | 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 |
| 334 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 | 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/__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 | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| LOW | shap/utils/__init__.py | 8 | CODE | |
| 73 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pyproject.toml | 141 | # NOTE: numpy.typing.mypy_plugin is deprecated in NumPy 2.3+ and will be removed in a future release | 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/utils/_masked_model.py | 181 | 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 | # f11 = fm(~m00.reshape(1,-1))[0] | COMMENT |
| LOW | shap/explainers/_partition.py | 441 | silent: bool, | COMMENT |
| LOW | shap/explainers/_partition.py | 601 | # #masks = np.zeros(2*len(inds)+1, dtype=int) | COMMENT |
| LOW | shap/explainers/_partition.py | 621 | COMMENT | |
| LOW | shap/explainers/_partition.py | 641 | COMMENT | |
| LOW | shap/explainers/_partition.py | 661 | COMMENT | |
| LOW | shap/explainers/_partition.py | 681 | # continue | COMMENT |
| LOW | shap/explainers/_partition.py | 701 | # eval_count += len(batch_masks) | COMMENT |
| LOW | shap/explainers/_partition.py | 721 | # elif fixed_context == 0: | 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 | 741 | etmp = np.transpose(np.transpose(self.maskMatrix[:, nonzero_inds[:-1]]) - 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 | # blue_rgba = np.array([30, 136, 229, 255]) / 255 | 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 | # # train lightgbm ranker model | 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 |
| LOW | tests/plots/test_decision.py | 281 | # | COMMENT |
| 33 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 | 19 | CODE | |
| LOW | shap/maskers/_image.py | 175 | CODE | |
| LOW | shap/maskers/_image.py | 75 | CODE | |
| LOW | shap/utils/transformers.py | 28 | CODE | |
| LOW | shap/utils/_clustering.py | 78 | CODE | |
| LOW | shap/utils/_clustering.py | 223 | CODE | |
| LOW | shap/utils/_masked_model.py | 377 | CODE | |
| LOW | shap/utils/_masked_model.py | 69 | 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 | 754 | CODE | |
| LOW | shap/explainers/_partition.py | 282 | CODE | |
| LOW | shap/explainers/_gradient.py | 268 | CODE | |
| LOW | shap/explainers/_gradient.py | 311 | CODE | |
| LOW | shap/explainers/_gradient.py | 575 | 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 | 229 | CODE | |
| LOW | shap/explainers/_kernel.py | 348 | CODE | |
| LOW | shap/explainers/_kernel.py | 557 | CODE | |
| LOW | shap/explainers/_kernel.py | 636 | CODE | |
| LOW | shap/explainers/_kernel.py | 690 | CODE | |
| LOW | shap/explainers/_exact.py | 245 | CODE | |
| LOW | shap/explainers/_exact.py | 378 | CODE | |
| LOW | shap/explainers/_exact.py | 399 | CODE | |
| LOW | shap/explainers/_exact.py | 121 | CODE | |
| LOW | shap/explainers/_tree.py | 139 | CODE | |
| LOW | shap/explainers/_tree.py | 515 | CODE | |
| LOW | shap/explainers/_tree.py | 975 | CODE | |
| LOW | shap/explainers/_tree.py | 1636 | CODE | |
| LOW | shap/explainers/_tree.py | 1818 | CODE | |
| LOW | shap/explainers/_tree.py | 2493 | CODE | |
| LOW | shap/explainers/pytree.py | 143 | CODE | |
| 31 more matches not shown… | ||||
| 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 | 883 | # Define an objective function for skopt to optimise. | COMMENT |
| MEDIUM | tests/explainers/test_tree.py | 2026 | # 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 | 142 | # 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 | 1037 | # 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,t,n={543(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="_ | CODE |
| MEDIUM⚡ | shap/plots/resources/bundle.js | 2 | (()=>{var e,t,n={543(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="_ | 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 | 8528 | "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 | 936 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1391 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1404 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1417 | 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 | 1459 | except Exception: | CODE |
| LOW | shap/explainers/_tree.py | 1469 | 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 | 28 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 30 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 73 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 75 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 105 | # ============================================================================== | COMMENT |
| MEDIUM | CMakeLists.txt | 108 | # ============================================================================== | 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 | 395 | 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,t,n={543(e,t,n){var r;e=n.nmd(e),function(){var a,i="Expected a function",o="__lodash_hash_undefined__",l="_ | 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 | 113 | # Set DYLD_LIBRARY_PATH to avoid OpenMP conflicts, see https://github.com/unit8co/darts/pull/3050 | COMMENT |
| LOW | .github/workflows/build_wheels.yml | 73 | # 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 |