{"id":26521101,"url":"https://github.com/leo-ware/pqp","last_synced_at":"2026-04-24T20:36:37.766Z","repository":{"id":65661099,"uuid":"534389095","full_name":"leo-ware/pqp","owner":"leo-ware","description":"A high-performance implementation of Shpitser's ID algorithm for causal identification in Rust","archived":false,"fork":false,"pushed_at":"2023-07-15T21:50:08.000Z","size":9491,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T13:46:38.276Z","etag":null,"topics":["causal-identification","causal-inference","causal-models"],"latest_commit_sha":null,"homepage":"https://leo-ware.github.io/pqp/","language":"Jupyter Notebook","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/leo-ware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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":"2022-09-08T20:51:13.000Z","updated_at":"2025-05-03T13:53:47.000Z","dependencies_parsed_at":"2023-07-15T15:31:42.529Z","dependency_job_id":"fa141f2a-4d66-464e-a9ca-b1f191b26367","html_url":"https://github.com/leo-ware/pqp","commit_stats":null,"previous_names":["leo-ware/capstone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leo-ware/pqp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo-ware%2Fpqp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo-ware%2Fpqp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo-ware%2Fpqp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo-ware%2Fpqp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leo-ware","download_url":"https://codeload.github.com/leo-ware/pqp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leo-ware%2Fpqp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32240199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":["causal-identification","causal-inference","causal-models"],"created_at":"2025-03-21T12:34:51.870Z","updated_at":"2026-04-24T20:36:37.761Z","avatar_url":"https://github.com/leo-ware.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Note:** I have not been actively maintaining the repository, so it is not recommended as a dependency for future projects.\n\n---\n\n# PQP\n\nThe name `pqp` is short for *Pourquoi pas?*. This phrase is French for *why not?*, because \"Why not?\" was the question we asked ourselves when we found there was no maintained, open-source package for structural causal modeling in Python. The package provides a convenient interface for causal modeling along with routines for identification, estimation, and visualization.\n\n## Installation\n\nThe package can be installed from PyPi using `pip`:\n\n```bash\npip install pqp\n```\n\n## Basic Usage\n\n```python\n\nfrom pqp.graph import Graph\nfrom pqp.variable import make_vars\n\n# create variables\nx, y, z = make_vars(\"xyz\")\n\n# the backdoor model\ng = Graph([\n    x \u003c= z,\n    y \u003c= z,\n    y \u003c= x,\n])\n\n# identification\ncausal_estimand = ATE(y, {x: 1}, {x: 0})\nestimator = g.identify(causal_estimand)\nprint(estimator)\n\n# \u003e\u003e\u003e E_(y) [ Σ_(z) [ [P(x = 1, y, z) * P(z) / P(x = 1, z)] ] ] - E_(y) [ Σ_(z) [ [P(x = 0, y, z) * P(z) / P(x = 0, z)] ] ]\n\n```\n\n## Further Reading\n\nFor more information, see the documentation at [https://leo-ware.github.io/pqp/](https://leo-ware.github.io/pqp/).\n\nThe source code is available at [https://github.com/leo-ware/pqp](https://github.com/leo-ware/pqp).\n\n## About\n\nThis package was created by Leo Ware as part of his undergraduate capstone project at Minerva University.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleo-ware%2Fpqp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleo-ware%2Fpqp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleo-ware%2Fpqp/lists"}