Repository Analysis

uber/causalml

Uplift modeling and causal inference with machine learning algorithms

26.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of uber/causalml, a Python project with 5,976 GitHub stars. SynthScan v2.0 examined 35,117 lines of code across 135 source files, recording 718 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 26.1 places this repository in the Moderate 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).

26.1
Adjusted Score
26.1
Raw Score
100%
Time Factor
2026-08-20
Last Push
6.0K
Stars
Python
Language
35.1K
Lines of Code
135
Files
718
Pattern Hits
2026-08-29
Scan Date
0.09
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 12MEDIUM 77LOW 629

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 718 distinct pattern matches across 14 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.

Hyper-Verbose Identifiers370 hits · 346 pts
SeverityFileLineSnippetContext
LOWtests/test_benchmark_loaders.py31def test_fetch_lalonde_reproduces_the_experimental_estimate():CODE
LOWtests/test_benchmark_loaders.py44def test_fetch_ihdp_replications_differ_and_carry_ground_truth():CODE
LOWtests/test_benchmark_loaders.py79def test_fetch_ihdp_validates_its_arguments():CODE
LOWtests/test_benchmark_loaders.py87def test_fetch_twins_mortality_matches_the_published_rate():CODE
LOWtests/test_benchmark_loaders.py102def test_fetch_twins_reveals_the_twin_the_assignment_picks():CODE
LOWtests/test_benchmark_loaders.py113def test_fetch_twins_assignment_is_seeded():CODE
LOWtests/test_benchmark_loaders.py139def test_ground_truth_metrics_run_on_the_datasets_that_have_it():CODE
LOWtests/test_cate_scoring.py48def test_compute_dr_pseudo_outcomes_shape(synthetic_data):CODE
LOWtests/test_cate_scoring.py62def test_compute_dr_pseudo_outcomes_recovers_ate(synthetic_data):CODE
LOWtests/test_cate_scoring.py80def test_dr_score_returns_series(synthetic_data):CODE
LOWtests/test_cate_scoring.py94def test_dr_score_ranks_perfect_model_lowest(synthetic_data):CODE
LOWtests/test_cate_scoring.py107def test_dr_score_with_precomputed_pseudo_outcomes(synthetic_data):CODE
LOWtests/test_cate_scoring.py124def test_dr_score_shares_pseudo_outcomes_with_rate_score(synthetic_data):CODE
LOWtests/test_cate_scoring.py152def test_dr_score_return_ci_returns_dataframe(synthetic_data):CODE
LOWtests/test_cate_scoring.py168def test_dr_score_ci_bounds_ordered(synthetic_data):CODE
LOWtests/test_cate_scoring.py184def test_plug_in_t_score_returns_series(synthetic_data):CODE
LOWtests/test_cate_scoring.py198def test_plug_in_t_score_ranks_perfect_model_lowest(synthetic_data):CODE
LOWtests/test_cate_scoring.py211def test_plug_in_t_score_return_ci_returns_dataframe(synthetic_data):CODE
LOWtests/test_cate_scoring.py232def test_plug_in_t_score_missing_columns_raises(synthetic_data):CODE
LOWtests/test_cate_scoring.py238def test_compute_dr_pseudo_outcomes_handles_imbalanced_treatment():CODE
LOWtests/test_cate_scoring.py262def test_plug_in_t_score_handles_imbalanced_treatment():CODE
LOWtests/test_cate_scoring.py296def test_dr_score_and_plug_in_t_score_all_finite(synthetic_data):CODE
LOWtests/test_cate_scoring.py318def test_compute_r_residuals_shape(synthetic_data):CODE
LOWtests/test_cate_scoring.py334def test_rlearner_score_returns_series(synthetic_data):CODE
LOWtests/test_cate_scoring.py348def test_rlearner_score_ranks_perfect_model_lowest(synthetic_data):CODE
LOWtests/test_cate_scoring.py361def test_rlearner_score_with_precomputed_residuals(synthetic_data):CODE
LOWtests/test_cate_scoring.py387def test_rlearner_score_return_ci_returns_dataframe(synthetic_data):CODE
LOWtests/test_cate_scoring.py403def test_rlearner_score_ci_bounds_ordered(synthetic_data):CODE
LOWtests/test_cate_scoring.py419def test_compute_r_residuals_handles_imbalanced_treatment():CODE
LOWtests/test_cate_scoring.py445def test_rlearner_score_handles_imbalanced_treatment():CODE
LOWtests/test_cate_scoring.py479def test_dr_plug_in_t_and_rlearner_score_all_finite(synthetic_data):CODE
LOWtests/test_cate_scoring.py510def test_compute_r_residuals_skips_propensity_when_w_residual_not_needed(CODE
LOWtests/test_cate_scoring.py528def test_dr_score_without_learner(synthetic_data):CODE
LOWtests/test_cate_scoring.py540def test_plug_in_t_score_without_learner(synthetic_data):CODE
LOWtests/test_cate_scoring.py552def test_dr_score_missing_one_learner(synthetic_data):CODE
LOWtests/test_jax_dragonnet.py14def test_dragonnet_jax_fit_predict():CODE
LOWtests/test_jax_dragonnet.py36def test_dragonnet_jax_predict_propensity():CODE
LOWtests/test_jax_dragonnet.py54def test_dragonnet_jax_save_load(tmp_path):CODE
LOWtests/test_meta_learners.py2031def test_fit_returns_self_regressor(Cls, kwargs):CODE
LOWtests/test_meta_learners.py2038def test_fit_returns_self_classifier(Cls, kwargs):CODE
LOWtests/test_meta_learners.py2044def test_xgb_rregressor_clone_no_kwargs():CODE
LOWtests/test_meta_learners.py2054def test_xgb_rregressor_clone_with_kwargs():CODE
LOWtests/test_meta_learners.py2295def test_t_classifier_fail_fast_return_ci_and_components():CODE
LOWtests/test_meta_learners.py2303def test_x_learner_pretrain_before_fit_raises():CODE
LOWtests/test_meta_learners.py2311def test_dr_learner_pretrain_before_fit_raises():CODE
LOWtests/test_meta_learners.py682def test_explainer_auto_importance_catboost(generate_regression_data):CODE
LOWtests/test_meta_learners.py1463def test_multi_treatment_learners():CODE
LOWtests/test_meta_learners.py1566 def _assert_plain_fit_predict(result, name):CODE
LOWtests/test_meta_learners.py2005def test_clone_get_params_regressor(Cls, kwargs):CODE
LOWtests/test_meta_learners.py2019def test_clone_get_params_classifier(Cls, kwargs):CODE
LOWtests/test_meta_learners.py2161def test_xgbt_classifier_clone():CODE
LOWtests/test_meta_learners.py2172def test_xgbr_classifier_clone():CODE
LOWtests/test_meta_learners.py2189def test_xgb_rregressor_fit_predict_return_ci():CODE
LOWtests/test_meta_learners.py2216def test_bit_identical_predict(Cls, kwargs):CODE
LOWtests/test_meta_learners.py2235def test_finite_predict_stochastic(Cls, kwargs):CODE
LOWtests/test_meta_learners.py2247def test_bit_identical_estimate_ate_s():CODE
LOWtests/test_meta_learners.py2258def test_t_regressor_return_ci_bit_identical():CODE
LOWtests/test_meta_learners.py2272def test_t_classifier_clone_fit_predict():CODE
LOWtests/test_meta_learners.py2281def test_x_classifier_verbatim_store_clone():CODE
LOWtests/test_meta_learners.py2323def test_base_rlearner_bootstrap_reproducibility(generate_regression_data):CODE
310 more matches not shown…
Decorative Section Separators68 hits · 238 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_meta_learners.py1497 # ── Shared assertion helpers ───────────────────────────────────────────────COMMENT
MEDIUMtests/test_meta_learners.py1572 # ── T-Learner ─────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_meta_learners.py1620 # ── X-Learner ─────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_meta_learners.py1682 # ── S-Learner ─────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_meta_learners.py1729 # ── DR-Learner ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_meta_learners.py1783 # ── R-Learner ─────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/test_meta_learners.py1949# =============================================================================COMMENT
MEDIUMtests/test_meta_learners.py1951# =============================================================================COMMENT
MEDIUMtests/test_causal_trees.py342# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_causal_trees.py348# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_causal_trees.py891# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_causal_trees.py895# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_causal_trees.py687# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_causal_trees.py692# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py91# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py93# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py387# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py389# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py297# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization_extended.py299# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py460# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py463# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py627# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py629# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py234# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py237# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py724# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py732# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py898# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_uplift_trees_kernel.py901# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py64# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py157# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py159# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py227# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py229# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py277# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_serialization.py279# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/tree/_tree/_classes.py57# =============================================================================COMMENT
MEDIUMcausalml/inference/tree/_tree/_classes.py59# =============================================================================COMMENT
MEDIUMcausalml/inference/tree/_tree/_classes.py84# =============================================================================COMMENT
MEDIUMcausalml/inference/tree/_tree/_classes.py86# =============================================================================COMMENT
MEDIUMcausalml/inference/meta/utils.py13# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py15# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py38# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py237# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py239# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py321# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py323# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py403# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/meta/utils.py405# ---------------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/jax/cevae/cevae.py134 # ------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/jax/cevae/cevae.py136 # ------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/jax/cevae/cevae.py149 # ------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/jax/cevae/cevae.py151 # ------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/jax/cevae/cevae.py317 # ------------------------------------------------------------------COMMENT
MEDIUMcausalml/inference/jax/cevae/cevae.py319 # ------------------------------------------------------------------COMMENT
8 more matches not shown…
Unused Imports147 hits · 129 pts
SeverityFileLineSnippetContext
LOWtests/test_fit_arg_order.py55CODE
LOWtests/test_counterfactual_unit_selection.py2CODE
LOWtests/test_serialization_extended.py10CODE
LOWtests/test_serialization_extended.py12CODE
LOWtests/test_serialization_extended.py13CODE
LOWtests/test_serialization.py10CODE
LOWtests/test_serialization.py13CODE
LOWtests/test_serialization.py13CODE
LOWcausalml/propensity.py5CODE
LOWcausalml/metrics/regression.py4CODE
LOWcausalml/metrics/regression.py5CODE
LOWcausalml/metrics/__init__.py1CODE
LOWcausalml/metrics/__init__.py1CODE
LOWcausalml/metrics/__init__.py1CODE
LOWcausalml/metrics/__init__.py2CODE
LOWcausalml/metrics/__init__.py2CODE
LOWcausalml/metrics/__init__.py2CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py3CODE
LOWcausalml/metrics/__init__.py13CODE
LOWcausalml/metrics/__init__.py13CODE
LOWcausalml/metrics/__init__.py13CODE
LOWcausalml/metrics/__init__.py13CODE
LOWcausalml/metrics/__init__.py13CODE
LOWcausalml/metrics/__init__.py13CODE
LOWcausalml/metrics/__init__.py21CODE
LOWcausalml/metrics/__init__.py21CODE
LOWcausalml/metrics/__init__.py21CODE
LOWcausalml/metrics/__init__.py21CODE
LOWcausalml/metrics/__init__.py21CODE
LOWcausalml/metrics/__init__.py28CODE
LOWcausalml/metrics/__init__.py28CODE
LOWcausalml/metrics/__init__.py29CODE
LOWcausalml/metrics/__init__.py29CODE
LOWcausalml/metrics/__init__.py29CODE
LOWcausalml/metrics/__init__.py30CODE
LOWcausalml/metrics/__init__.py30CODE
LOWcausalml/metrics/__init__.py30CODE
LOWcausalml/metrics/__init__.py30CODE
LOWcausalml/metrics/__init__.py36CODE
LOWcausalml/metrics/__init__.py36CODE
LOWcausalml/metrics/__init__.py37CODE
LOWcausalml/metrics/__init__.py37CODE
LOWcausalml/metrics/__init__.py37CODE
LOWcausalml/metrics/__init__.py37CODE
LOWcausalml/optimize/__init__.py1CODE
LOWcausalml/optimize/__init__.py2CODE
LOWcausalml/optimize/__init__.py3CODE
LOWcausalml/optimize/__init__.py3CODE
LOWcausalml/optimize/__init__.py3CODE
LOWcausalml/optimize/__init__.py4CODE
LOWcausalml/optimize/__init__.py5CODE
LOWcausalml/dataset/__init__.py1CODE
LOWcausalml/dataset/__init__.py1CODE
87 more matches not shown…
Docstring Block Structure9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHcausalml/metrics/ground_truth.py75Expected loss of the treat-if-``tau_hat``-is-positive policy. Following Shalit, Johansson and Sontag (2017):: STRING
HIGHcausalml/metrics/sensitivity.py266Return separate potential-outcome predictions mu1_hat, mu0_hat. Only supported for S/T/DR-learner-style objectsSTRING
HIGHcausalml/dataset/_base.py68Return the local path to a cached dataset file, downloading it if needed. The digest is verified on download and onSTRING
HIGHcausalml/dataset/_benchmarks.py111Load one replication of the IHDP benchmark. Covariates from the Infant Health and Development Program randomized trSTRING
HIGHcausalml/dataset/semiSynthetic.py279 Build the m-th iteration of the MIU (Model-based Imputation with Uncertainty) ensemble. This function implemenSTRING
HIGHcausalml/dataset/semiSynthetic.py579 Train an ensemble of M MIU models and return the best one. This function implements the complete MIU (Model-baSTRING
HIGHcausalml/dataset/semiSynthetic.py742 Perform cross-validation to find optimal hyperparameters for the MIU model. This function performs bootstrap-bSTRING
HIGHcausalml/dataset/semiSynthetic.py911 Train a single MIU model for a specific parameter combination and bootstrap iteration. This function is designSTRING
HIGHcausalml/inference/serialization.py121Load a previously saved learner from disk. Checks the saved metadata against the current environment and warns STRING
AI Structural Patterns43 hits · 42 pts
SeverityFileLineSnippetContext
LOWtests/test_serialization.py49CODE
LOWcausalml/match.py295CODE
LOWcausalml/metrics/rate.py265CODE
LOWcausalml/metrics/visualize.py18CODE
LOWcausalml/metrics/visualize.py450CODE
LOWcausalml/metrics/visualize.py555CODE
LOWcausalml/metrics/visualize.py644CODE
LOWcausalml/metrics/visualize.py693CODE
LOWcausalml/metrics/visualize.py737CODE
LOWcausalml/metrics/visualize.py779CODE
LOWcausalml/metrics/visualize.py873CODE
LOWcausalml/metrics/cate_scoring.py268CODE
LOWcausalml/metrics/cate_scoring.py394CODE
LOWcausalml/metrics/cate_scoring.py499CODE
LOWcausalml/dataset/classification.py55CODE
LOWcausalml/dataset/classification.py167CODE
LOWcausalml/dataset/classification.py171CODE
LOWcausalml/dataset/classification.py454CODE
LOWcausalml/dataset/semiSynthetic.py564CODE
LOWcausalml/dataset/semiSynthetic.py724CODE
LOWcausalml/dataset/semiSynthetic.py19CODE
LOWcausalml/inference/tree/plot.py591CODE
LOWcausalml/inference/tree/causal/causaltree.py64CODE
LOWcausalml/inference/tree/causal/causalforest.py168CODE
LOWcausalml/inference/tree/_uplift/uplifttree.py73CODE
LOWcausalml/inference/tree/_uplift/uplifttree.py661CODE
LOWcausalml/inference/tree/_uplift/upliftforest.py101CODE
LOWcausalml/inference/tree/_uplift/upliftforest.py280CODE
LOWcausalml/inference/meta/rlearner.py39CODE
LOWcausalml/inference/meta/rlearner.py339CODE
LOWcausalml/inference/meta/rlearner.py449CODE
LOWcausalml/inference/meta/rlearner.py654CODE
LOWcausalml/inference/meta/xlearner.py468CODE
LOWcausalml/inference/meta/base.py255CODE
LOWcausalml/inference/meta/base.py328CODE
LOWcausalml/inference/torch/cevae.py40CODE
LOWcausalml/inference/iv/drivlearner.py332CODE
LOWcausalml/inference/iv/drivlearner.py443CODE
LOWcausalml/inference/iv/drivlearner.py657CODE
LOWcausalml/inference/iv/drivlearner.py730CODE
LOWcausalml/inference/jax/dragonnet.py312CODE
LOWcausalml/inference/jax/cevae/cevae.py106CODE
LOWcausalml/inference/tf/dragonnet.py41CODE
Redundant / Tautological Comments26 hits · 33 pts
SeverityFileLineSnippetContext
LOWtests/test_meta_learners.py168 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py240 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py292 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py333 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py374 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py415 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py469 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py512 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py553 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py594 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py671 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py740 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py829 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py883 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py926 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py995 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py1061 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py1114 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_meta_learners.py1130 # Check if XGBRRegressor successfully produces treatment effect estimationCOMMENT
LOWtests/test_meta_learners.py1221 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_uplift_trees.py111 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_uplift_trees.py189 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
LOWtests/test_uplift_trees.py199 # Check if the total count is split correctly, at least for control group in the first levelCOMMENT
LOWtests/test_uplift_trees.py217 # Check if it works as expected after filling with validation dataCOMMENT
LOWtests/test_uplift_trees.py256 # Check if the features with positive importance is not more than number of nodesCOMMENT
LOWtests/test_ivlearner.py75 # Check if the normalized AUUC score of model's prediction is higher than random (0.5).COMMENT
Deep Nesting17 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/test_fit_arg_order.py212CODE
LOWtests/test_fit_arg_order.py436CODE
LOWcausalml/match.py146CODE
LOWcausalml/metrics/sensitivity.py583CODE
LOWcausalml/dataset/synthetic.py39CODE
LOWcausalml/dataset/synthetic.py211CODE
LOWcausalml/dataset/synthetic.py320CODE
LOWcausalml/dataset/classification.py171CODE
LOWcausalml/dataset/classification.py454CODE
LOWcausalml/dataset/semiSynthetic.py266CODE
LOWcausalml/dataset/semiSynthetic.py564CODE
LOWcausalml/inference/tree/plot.py69CODE
LOWcausalml/inference/tree/_tree/_classes.py225CODE
LOWcausalml/inference/tree/causal/causaltree.py894CODE
LOWcausalml/inference/tree/causal/_tree.py93CODE
LOWcausalml/inference/tree/_uplift/_tree.py89CODE
LOWcausalml/inference/iv/drivlearner.py105CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHcausalml/inference/meta/tlearner.py0predict treatment effects. args: x (np.matrix, np.array, pd.dataframe, pl.dataframe, or pl.lazyframe): a feature matrix.STRING
HIGHcausalml/inference/meta/slearner.py0predict treatment effects. args: x (np.matrix, np.array, pd.dataframe, pl.dataframe, or pl.lazyframe): a feature matrix.STRING
HIGHcausalml/inference/meta/drlearner.py0predict treatment effects. args: x (np.matrix, np.array, pd.dataframe, pl.dataframe, or pl.lazyframe): a feature matrix.STRING
Over-Commented Block14 hits · 14 pts
SeverityFileLineSnippetContext
LOW.readthedocs.yml21 # Read the Docs already builds on every pull request and reports a statusCOMMENT
LOWsetup.cfg1[metadata]COMMENT
LOWdocs/conf.py1#!/usr/bin/env pythonCOMMENT
LOWdocs/conf.py21# directory, add these directories to sys.path here. If the directory isCOMMENT
LOWdocs/conf.py141# for |version| and |release|, also used in various other places throughoutCOMMENT
LOWdocs/conf.py161# directories to ignore when looking for source files.COMMENT
LOWdocs/conf.py181# color-mode toggle. Pinning a single style here breaks the dark one.COMMENT
LOWdocs/conf.py221COMMENT
LOWdocs/conf.py241# which it looks for at the root of the static output, resolve there too.COMMENT
LOWdocs/conf.py261# to template names.COMMENT
LOWdocs/conf.py281# Default is True.COMMENT
LOWdocs/conf.py301COMMENT
LOWdocs/conf.py321COMMENT
LOWcausalml/inference/meta/utils.py21 pl = NoneCOMMENT
AI Slop Vocabulary5 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_jax_cevae.py112 # Loose bound so this stays robust to seeds / mini-batch shuffle order.COMMENT
MEDIUMcausalml/metrics/cate_scoring.py72 """Construct cross-fitted doubly-robust (AIPW) pseudo-outcomes for CATE evaluation.STRING
MEDIUMcausalml/metrics/cate_scoring.py287 """Score fitted CATE models via the doubly-robust (DR) pseudo-outcome loss.STRING
MEDIUMcausalml/inference/meta/drlearner.py128 # the outcome regression, and the treatment regression on the doubly robust estimates. The use ofCOMMENT
MEDIUMcausalml/inference/iv/drivlearner.py133 # the outcome regression, and the treatment regression on the doubly robust estimates. The use ofCOMMENT
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_uplift_trees.py90 # Create a synthetic population:COMMENT
MEDIUMtests/test_uplift_trees.py172 # Create a synthetic population:COMMENT
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
Modern Structural Boilerplate7 hits · 7 pts
SeverityFileLineSnippetContext
LOWcausalml/__init__.py1__all__ = [CODE
LOWcausalml/metrics/ground_truth.py17__all__ = ["pehe", "ate_error", "policy_risk"]CODE
LOWcausalml/inference/tree/_tree/__init__.py12__all__ = [CODE
LOWcausalml/inference/jax/__init__.py4__all__ = ["DragonNet", "CEVAE"]CODE
LOWcausalml/inference/jax/cevae/__init__.py5__all__ = ["CEVAE"]CODE
LOWcausalml/inference/jax/cevae/cevae.py31logger = logging.getLogger(__name__)CODE
LOWcausalml/inference/jax/cevae/losses.py59__all__ = ["cevae_loss", "trace_causal_effect_elbo"]CODE
Excessive Try-Catch Wrapping5 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/test_fit_arg_order.py230 except Exception: # optional backend absent, or an import-time failureCODE
LOWcausalml/dataset/_base.py111 except Exception as exc:CODE
LOWcausalml/inference/serialization.py34 except Exception:CODE
LOWcausalml/inference/serialization.py74 except Exception:CODE
LOWcausalml/inference/tree/plot.py200 except Exception as e:CODE
Modern AI Meta-Vocabulary1 hit · 4 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_uplift_trees_kernel.py462# on sklearn's ForestRegressor scaffolding, replacing the legacy joblib forest.COMMENT