{"id":14958338,"url":"https://github.com/dynobo/lmdiag","last_synced_at":"2026-03-04T23:32:13.674Z","repository":{"id":57438765,"uuid":"133131495","full_name":"dynobo/lmdiag","owner":"dynobo","description":"Python Library providing Diagnostic Plots for Linear Regression","archived":false,"fork":false,"pushed_at":"2024-06-25T09:17:37.000Z","size":3009,"stargazers_count":14,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-21T15:59:25.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dynobo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-12T09:19:52.000Z","updated_at":"2024-06-25T10:23:54.000Z","dependencies_parsed_at":"2024-09-02T16:21:22.015Z","dependency_job_id":"04588d69-ee73-4b80-b70f-a8c6a6ca2b6e","html_url":"https://github.com/dynobo/lmdiag","commit_stats":{"total_commits":36,"total_committers":2,"mean_commits":18.0,"dds":0.02777777777777779,"last_synced_commit":"439f6284a08f4329a0ca8fcbc8da7158f856cebf"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dynobo/lmdiag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynobo%2Flmdiag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynobo%2Flmdiag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynobo%2Flmdiag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynobo%2Flmdiag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dynobo","download_url":"https://codeload.github.com/dynobo/lmdiag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dynobo%2Flmdiag/sbom","scorecard":{"id":362441,"data":{"date":"2025-08-11","repo":{"name":"github.com/dynobo/lmdiag","commit":"3739aa78c183b2e055f6e853665fa535eaa6712b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/python.yml:54","Warn: no topLevel permission defined: .github/workflows/python.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/dynobo/lmdiag/python.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python.yml:62","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T11:08:25.534Z","repository_id":57438765,"created_at":"2025-08-18T11:08:25.534Z","updated_at":"2025-08-18T11:08:25.534Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30099404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T23:31:22.529Z","status":"ssl_error","status_checked_at":"2026-03-04T23:31:22.112Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:16:47.956Z","updated_at":"2026-03-04T23:32:13.628Z","avatar_url":"https://github.com/dynobo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lmdiag\n\n**Python Library providing Diagnostic Plots for Linear Regression Models.** (Like\n[plot.lm](https://www.rdocumentation.org/packages/stats/versions/3.5.0/topics/plot.lm)\nin R.)\n\nI built this, because I missed the diagnostics plots of R for a university project.\nThere are some substitutions in Python for individual charts, but they are spread over\ndifferent libraries and sometimes don't show the exact same. My implementation tries to\ncopycat the R-plots, but I didn't reimplement the R-code: The charts are just based on\navailable documentation.\n\n## Installation\n\n`pip install lmdiag`\n\n## Usage\n\nlmdiag generates plots for _fitted_ linear regression models from\n[`statsmodels`](https://www.statsmodels.org/stable/index.html),\n[`linearmodels`](https://bashtage.github.io/linearmodels/doc/index.html) and\n[`scikit-learn`](https://scikit-learn.org/stable/).\n\nYou can find some usage examples in\n[this jupyter notebook](https://github.com/dynobo/lmdiag/blob/master/example.ipynb).\n\n### Example\n\n```python\nimport numpy as np\nimport statsmodels.api as sm\nimport lmdiag\n\n# Fit model with random sample data\nnp.random.seed(20)\nX = np.random.normal(size=30, loc=20, scale=3)\ny = 5 + 5 * X + np.random.normal(size=30)\nX = sm.add_constant(predictor)  # intercept required by statsmodels\nlm = sm.OLS(y, X).fit()\n\n# Plot lmdiag facet chart\nlmdiag.style.use(style=\"black_and_red\")  # Mimic R's plot.lm style\nfig = lmdiag.plot(lm)\nfig.show()\n```\n\n![image](https://raw.githubusercontent.com/dynobo/lmdiag/master/example.png)\n\n### Methods\n\n- Draw matrix of all plots:\n\n  `lmdiag.plot(lm)`\n\n- Draw individual plots:\n\n  `lmdiag.resid_fit(lm)`\n\n  `lmdiag.q_q(lm)`\n\n  `lmdiag.scale_loc(lm)`\n\n  `lmdiag.resid_lev(lm)`\n\n- Print description to aid plot interpretation:\n\n  `lmdiag.help()` (for all plots)\n\n  `lmdiag.help('\u003cmethod name\u003e')` (for individual plot)\n\n### Increase performance\n\nPlotting models fitted on large datasets might be slow. There are some things you can\ntry to speed it up:\n\n#### 1. Tune LOWESS-parameters\n\nThe red smoothing lines are calculated using the \"Locally Weighted Scatterplot\nSmoothing\" algorithm, which can be quite expensive. Try a _lower_ value for `lowess_it`\nand a _higher_ value for `lowess_delta` to gain speed at the cost of accuracy:\n\n```python\nlmdiag.plot(lm, lowess_it=1, lowess_delta=0.02)\n# Defaults are: lowess_it=2, lowess_delta=0.005\n```\n\n(For details about those parameters, see\n[statsmodels docs](https://www.statsmodels.org/stable/generated/statsmodels.nonparametric.smoothers_lowess.lowess.html).)\n\n#### 2. Change matplotlib backend\n\nTry a different\n[matplotlib backend](https://matplotlib.org/stable/users/explain/figure/backends.html).\nEspecially static backends like `AGG` or `Cairo` should be faster, e.g.:\n\n```python\nimport matplotlib\nmatplotlib.use('agg')\n```\n\n### Setup development environment\n\n```sh\npython -m venv .venv\nsource .venv/bin/activate\npip install -e '.[dev]'\npre-commit install\n```\n\n### Certification\n\n![image](https://raw.githubusercontent.com/dynobo/lmdiag/master/badge.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynobo%2Flmdiag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynobo%2Flmdiag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynobo%2Flmdiag/lists"}