Skip to main content

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:

pip install pqp

Basic Usage

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

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

About

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

Metadata

Release files for pqp 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pqp 0.3.5
File Size Uploaded Provenance Actions
pqp-0.3.5.tar.gz 3.6 MB Without provenance Details for pqp-0.3.5.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pqp 0.3.5
File Actions
pqp-0.3.5-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details for pqp-0.3.5-cp37-abi3-win_amd64.whl
pqp-0.3.5-cp37-abi3-win32.whl CPython 3.7 abi3 Windows x86-32 Details for pqp-0.3.5-cp37-abi3-win32.whl
pqp-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details for pqp-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pqp-0.3.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.7 abi3 Linux glibc 2.17+ IBM System/390x Details for pqp-0.3.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
pqp-0.3.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.7 abi3 Linux glibc 2.17+ PowerPC 64-le Details for pqp-0.3.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
pqp-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.7 abi3 Linux glibc 2.17+ ARMv7l Details for pqp-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
pqp-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 abi3 Linux glibc 2.17+ ARM64 Details for pqp-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
pqp-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.7 abi3 Linux glibc 2.5+ x86-32 Details for pqp-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
pqp-0.3.5-cp37-abi3-macosx_11_0_arm64.whl CPython 3.7 abi3 macOS 11.0+ ARM64 Details for pqp-0.3.5-cp37-abi3-macosx_11_0_arm64.whl
pqp-0.3.5-cp37-abi3-macosx_10_7_x86_64.whl CPython 3.7 abi3 macOS 10.7+ x86-64 Details for pqp-0.3.5-cp37-abi3-macosx_10_7_x86_64.whl

Total release size: 12.2 MB

Release files / pqp-0.3.5.tar.gz

Download URL pqp-0.3.5.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
3f86393b4ff5dcd3cee9d549c983834b1e080bf8e7e1334d2ae15b631b0f0f18
BLAKE2b-256 checksum
How to use checksums
11b2dd642e7148164ca98373d3e99e8023ef56a645cf0f6337527a7a30188178
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-win_amd64.whl

Download URL pqp-0.3.5-cp37-abi3-win_amd64.whl
Size 210.6 kB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
443a107b40a085d36956004aabe0aa3334939a64c3e583f5c3ee38676585a38a
BLAKE2b-256 checksum
How to use checksums
21dc58468ed705951590d45616c7f3f139a165dcd74a8d02a63e8b2b215e239a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-win32.whl

Download URL pqp-0.3.5-cp37-abi3-win32.whl
Size 206.6 kB
Tags CPython 3.7 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
c10326c3ce6a2a33260440be45d01d6690139b577ea4451f9900d0d502ac9cdf
BLAKE2b-256 checksum
How to use checksums
02edf1d81291961cc8594dfaf6d93922da144cf084a8e58f45aa6f4a4caef223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pqp-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.2 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0d459de21abfda659291bdcd883bcd441b40870451cbe17fcd246db53e3bb147
BLAKE2b-256 checksum
How to use checksums
856e6d5af55101d2e8e58043ccbc5e24180e1d39144744948fbba632e82e92f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL pqp-0.3.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 1.4 MB
Tags CPython 3.7 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
bcdb4965b69a9eb96e0e43117db80387de5fef870a5e0e15e0260188c794959f
BLAKE2b-256 checksum
How to use checksums
d58391ef6d0423b99495a9830ef6b67bfb9c07cc7e75ad173ce96bf7454116e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL pqp-0.3.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 1.3 MB
Tags CPython 3.7 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
931867b41679da63f6b82580a79256d087943c87ed2833b72df8fe786b38c19a
BLAKE2b-256 checksum
How to use checksums
d0aedfff0aa3fc177283fb9d2948dd10452ffdbab88f5a262fb95b132833d0bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL pqp-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 1.2 MB
Tags CPython 3.7 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
7c42023192389faeb003c743a32fa0a5bee70b72ab2d7c4f751c6d6628e75e01
BLAKE2b-256 checksum
How to use checksums
3860af3c28cea56e36c4b78c88842963ef80f91efc206e7bca01e1b34f85aa6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pqp-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags CPython 3.7 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
45c65a76ccaed225dd0b22a9abadbed74049b739092cabd2854185615192416d
BLAKE2b-256 checksum
How to use checksums
41effdd5473317634e43be35e10494aa3e509dfaaac61c2a0349e8aed5335d71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl

Download URL pqp-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Size 1.2 MB
Tags CPython 3.7 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
096ac0a567a60dab66a3d08db7b5b32591ba7b73af214ae6a869f6929af74fc0
BLAKE2b-256 checksum
How to use checksums
fee08e1db12f05ccdd8596a3e2bd25a92adf3d44836dde873e2e2b6806e05b25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-macosx_11_0_arm64.whl

Download URL pqp-0.3.5-cp37-abi3-macosx_11_0_arm64.whl
Size 326.7 kB
Tags CPython 3.7 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0e402b69af0f4abaed27016c17e242abb523b0848d2aaca6d762a80b43389917
BLAKE2b-256 checksum
How to use checksums
714adc46280c48b5f8f17a9dc51a94c9e9e85e7d4d3ce64ec5ac85ab126ef574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Release files / pqp-0.3.5-cp37-abi3-macosx_10_7_x86_64.whl

Download URL pqp-0.3.5-cp37-abi3-macosx_10_7_x86_64.whl
Size 340.4 kB
Tags CPython 3.7 abi3 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
79beb5d8e0b028aa49f46388d0e0b3c500beb64a19710f58868b418280788614
BLAKE2b-256 checksum
How to use checksums
3739aea8b64f1ab1e6f2054798baf310c6894ddadd211fe6b7ddb109598a58af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.1.0

Security for pqp 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page