pqp


Namepqp JSON
Version 0.3.5 PyPI version JSON
download
home_pageNone
SummarySubroutines for structural causal modeling
upload_time2023-07-15 21:33:57
maintainerNone
docs_urlNone
authorLeo Ware
requires_python>=3.8
licenseNone
keywords causal inference causal identification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PQP

The 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.

## Installation

The package can be installed from PyPi using `pip`:

```bash
pip install pqp
```

## Basic Usage

```python

from pqp.graph import Graph
from pqp.variable import make_vars

# create variables
x, y, z = make_vars("xyz")

# the backdoor model
g = Graph([
    x <= z,
    y <= z,
    y <= x,
])

# identification
causal_estimand = ATE(y, {x: 1}, {x: 0})
estimator = g.identify(causal_estimand)
print(estimator)

# >>> 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)] ] ]

```

## Further Reading

For more information, see the documentation at [https://leo-ware.github.io/pqp/](https://leo-ware.github.io/pqp/).

The source code is available at [https://github.com/leo-ware/pqp](https://github.com/leo-ware/pqp).

## About

This package was created by Leo Ware as part of his undergraduate capstone project at Minerva University.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pqp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "causal inference,causal identification",
    "author": "Leo Ware",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/11/b2/dd642e7148164ca98373d3e99e8023ef56a645cf0f6337527a7a30188178/pqp-0.3.5.tar.gz",
    "platform": null,
    "description": "# 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 <= z,\n    y <= z,\n    y <= x,\n])\n\n# identification\ncausal_estimand = ATE(y, {x: 1}, {x: 0})\nestimator = g.identify(causal_estimand)\nprint(estimator)\n\n# >>> E_(y) [ \u03a3_(z) [ [P(x = 1, y, z) * P(z) / P(x = 1, z)] ] ] - E_(y) [ \u03a3_(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",
    "bugtrack_url": null,
    "license": null,
    "summary": "Subroutines for structural causal modeling",
    "version": "0.3.5",
    "project_urls": {
        "Homepage": "https://leo-ware.github.io/capstone/",
        "Source": "https://github.com/leo-ware/capstone"
    },
    "split_keywords": [
        "causal inference",
        "causal identification"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3739aea8b64f1ab1e6f2054798baf310c6894ddadd211fe6b7ddb109598a58af",
                "md5": "c824c27224f82a5b0235616a8401c53d",
                "sha256": "79beb5d8e0b028aa49f46388d0e0b3c500beb64a19710f58868b418280788614"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-macosx_10_7_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c824c27224f82a5b0235616a8401c53d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 340439,
            "upload_time": "2023-07-15T21:33:38",
            "upload_time_iso_8601": "2023-07-15T21:33:38.884901Z",
            "url": "https://files.pythonhosted.org/packages/37/39/aea8b64f1ab1e6f2054798baf310c6894ddadd211fe6b7ddb109598a58af/pqp-0.3.5-cp37-abi3-macosx_10_7_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "714adc46280c48b5f8f17a9dc51a94c9e9e85e7d4d3ce64ec5ac85ab126ef574",
                "md5": "084343453ba304ee78223c114cfd5e60",
                "sha256": "0e402b69af0f4abaed27016c17e242abb523b0848d2aaca6d762a80b43389917"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "084343453ba304ee78223c114cfd5e60",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 326724,
            "upload_time": "2023-07-15T21:33:40",
            "upload_time_iso_8601": "2023-07-15T21:33:40.737303Z",
            "url": "https://files.pythonhosted.org/packages/71/4a/dc46280c48b5f8f17a9dc51a94c9e9e85e7d4d3ce64ec5ac85ab126ef574/pqp-0.3.5-cp37-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "41effdd5473317634e43be35e10494aa3e509dfaaac61c2a0349e8aed5335d71",
                "md5": "1342feea94181e72745fcc26db4db20d",
                "sha256": "45c65a76ccaed225dd0b22a9abadbed74049b739092cabd2854185615192416d"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "1342feea94181e72745fcc26db4db20d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1183515,
            "upload_time": "2023-07-15T21:33:42",
            "upload_time_iso_8601": "2023-07-15T21:33:42.738879Z",
            "url": "https://files.pythonhosted.org/packages/41/ef/fdd5473317634e43be35e10494aa3e509dfaaac61c2a0349e8aed5335d71/pqp-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3860af3c28cea56e36c4b78c88842963ef80f91efc206e7bca01e1b34f85aa6f",
                "md5": "9b351ffcd8faecc555c58f2bae4b77fd",
                "sha256": "7c42023192389faeb003c743a32fa0a5bee70b72ab2d7c4f751c6d6628e75e01"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "9b351ffcd8faecc555c58f2bae4b77fd",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1202164,
            "upload_time": "2023-07-15T21:33:44",
            "upload_time_iso_8601": "2023-07-15T21:33:44.647997Z",
            "url": "https://files.pythonhosted.org/packages/38/60/af3c28cea56e36c4b78c88842963ef80f91efc206e7bca01e1b34f85aa6f/pqp-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d0aedfff0aa3fc177283fb9d2948dd10452ffdbab88f5a262fb95b132833d0bb",
                "md5": "c42ac9258916f2b08f8f7784baf190a5",
                "sha256": "931867b41679da63f6b82580a79256d087943c87ed2833b72df8fe786b38c19a"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "c42ac9258916f2b08f8f7784baf190a5",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1306254,
            "upload_time": "2023-07-15T21:33:46",
            "upload_time_iso_8601": "2023-07-15T21:33:46.798886Z",
            "url": "https://files.pythonhosted.org/packages/d0/ae/dfff0aa3fc177283fb9d2948dd10452ffdbab88f5a262fb95b132833d0bb/pqp-0.3.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d58391ef6d0423b99495a9830ef6b67bfb9c07cc7e75ad173ce96bf7454116e8",
                "md5": "d7e6eb231be488f418c8f7543ff65052",
                "sha256": "bcdb4965b69a9eb96e0e43117db80387de5fef870a5e0e15e0260188c794959f"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "d7e6eb231be488f418c8f7543ff65052",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1378839,
            "upload_time": "2023-07-15T21:33:48",
            "upload_time_iso_8601": "2023-07-15T21:33:48.698838Z",
            "url": "https://files.pythonhosted.org/packages/d5/83/91ef6d0423b99495a9830ef6b67bfb9c07cc7e75ad173ce96bf7454116e8/pqp-0.3.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "856e6d5af55101d2e8e58043ccbc5e24180e1d39144744948fbba632e82e92f1",
                "md5": "5ce214d87e9b9acb8f98fdb2c738a381",
                "sha256": "0d459de21abfda659291bdcd883bcd441b40870451cbe17fcd246db53e3bb147"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5ce214d87e9b9acb8f98fdb2c738a381",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1189267,
            "upload_time": "2023-07-15T21:33:50",
            "upload_time_iso_8601": "2023-07-15T21:33:50.556183Z",
            "url": "https://files.pythonhosted.org/packages/85/6e/6d5af55101d2e8e58043ccbc5e24180e1d39144744948fbba632e82e92f1/pqp-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fee08e1db12f05ccdd8596a3e2bd25a92adf3d44836dde873e2e2b6806e05b25",
                "md5": "57e93e8d95350df9761caff03974dda1",
                "sha256": "096ac0a567a60dab66a3d08db7b5b32591ba7b73af214ae6a869f6929af74fc0"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
            "has_sig": false,
            "md5_digest": "57e93e8d95350df9761caff03974dda1",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 1224276,
            "upload_time": "2023-07-15T21:33:52",
            "upload_time_iso_8601": "2023-07-15T21:33:52.367636Z",
            "url": "https://files.pythonhosted.org/packages/fe/e0/8e1db12f05ccdd8596a3e2bd25a92adf3d44836dde873e2e2b6806e05b25/pqp-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "02edf1d81291961cc8594dfaf6d93922da144cf084a8e58f45aa6f4a4caef223",
                "md5": "0476d4cb3269a20d980f2f603bb58a9b",
                "sha256": "c10326c3ce6a2a33260440be45d01d6690139b577ea4451f9900d0d502ac9cdf"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "0476d4cb3269a20d980f2f603bb58a9b",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 206638,
            "upload_time": "2023-07-15T21:33:53",
            "upload_time_iso_8601": "2023-07-15T21:33:53.938091Z",
            "url": "https://files.pythonhosted.org/packages/02/ed/f1d81291961cc8594dfaf6d93922da144cf084a8e58f45aa6f4a4caef223/pqp-0.3.5-cp37-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "21dc58468ed705951590d45616c7f3f139a165dcd74a8d02a63e8b2b215e239a",
                "md5": "120871afaab4f4d15515266c07a2246f",
                "sha256": "443a107b40a085d36956004aabe0aa3334939a64c3e583f5c3ee38676585a38a"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5-cp37-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "120871afaab4f4d15515266c07a2246f",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.8",
            "size": 210571,
            "upload_time": "2023-07-15T21:33:55",
            "upload_time_iso_8601": "2023-07-15T21:33:55.607571Z",
            "url": "https://files.pythonhosted.org/packages/21/dc/58468ed705951590d45616c7f3f139a165dcd74a8d02a63e8b2b215e239a/pqp-0.3.5-cp37-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "11b2dd642e7148164ca98373d3e99e8023ef56a645cf0f6337527a7a30188178",
                "md5": "d2efceb2a97c817482060f1a2fdc4b72",
                "sha256": "3f86393b4ff5dcd3cee9d549c983834b1e080bf8e7e1334d2ae15b631b0f0f18"
            },
            "downloads": -1,
            "filename": "pqp-0.3.5.tar.gz",
            "has_sig": false,
            "md5_digest": "d2efceb2a97c817482060f1a2fdc4b72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3620015,
            "upload_time": "2023-07-15T21:33:57",
            "upload_time_iso_8601": "2023-07-15T21:33:57.743196Z",
            "url": "https://files.pythonhosted.org/packages/11/b2/dd642e7148164ca98373d3e99e8023ef56a645cf0f6337527a7a30188178/pqp-0.3.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-15 21:33:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "leo-ware",
    "github_project": "capstone",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pqp"
}
        
Elapsed time: 0.15331s