A Flexible Python Implementation of Targeted Estimation for Survival and Competing Risks Analysis
Project description
PyTMLE
PyTMLE is a flexible Python implementation of the Targeted Maximum Likelihood Estimation (TMLE) framework for survival and competing risks outcomes.
The package can be installed from PyPI, for example using pip:
pip install pytmle
It is designed to be easy to use with default models for initial estimates of nuisance functions which are applied in a super learner framework. With a pandas dataframe containing event times, indicators, and (binary) treatment group information in specified columns, it is straight-forward to fit a main PyTMLE class object and get predictions and plots for selected target_times:
from pytmle import PyTMLE
tmle = PyTMLE(df,
col_event_times="time",
col_event_indicator="status",
col_group="group",
target_times=target_times)
tmle.plot(type="risks") # get estimated counterfactual CIF, or set to "rr" or "rd" for ATE estimates based on RR or RD
pred = tmle.predict(type="risks") # store estimates in a data frame
However, it also allows for custom models to be used for the initial estimates or even passing initial estimates directly to the second TMLE stage.
Have a look at the package's Read the Docs page for the detailed API reference and tutorial notebooks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytmle-0.2.0.tar.gz.
File metadata
- Download URL: pytmle-0.2.0.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a10aa15d26be69cf7fc35bc82bb276d1434a213a94a6ad5ef2111d7235d13f
|
|
| MD5 |
866a6d8ca2f4bd918feae78c16a0a960
|
|
| BLAKE2b-256 |
f0a2e8716caf7a6c0e3fee5b5ca888a33785c421f4e9f1ec55ff5e7b78684d9d
|
Provenance
The following attestation bundles were made for pytmle-0.2.0.tar.gz:
Publisher:
publish-to-pypi.yml on SCAI-BIO/pytmle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytmle-0.2.0.tar.gz -
Subject digest:
70a10aa15d26be69cf7fc35bc82bb276d1434a213a94a6ad5ef2111d7235d13f - Sigstore transparency entry: 206989647
- Sigstore integration time:
-
Permalink:
SCAI-BIO/pytmle@c5fec1898be3cce5f6d4afdb513bb99083cb037c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SCAI-BIO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c5fec1898be3cce5f6d4afdb513bb99083cb037c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytmle-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pytmle-0.2.0-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d4c62b39c715e25a81c75c86fbff22b937e8bd76f7e57fc6b0cf3a1342a8d68
|
|
| MD5 |
97bcb902f394b25b6c23e9c35ef6ecf0
|
|
| BLAKE2b-256 |
2e1827aabc6ecd1c742e5bc059746908bb671d987c13cc8dee1e013f569e8be3
|
Provenance
The following attestation bundles were made for pytmle-0.2.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on SCAI-BIO/pytmle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytmle-0.2.0-py3-none-any.whl -
Subject digest:
0d4c62b39c715e25a81c75c86fbff22b937e8bd76f7e57fc6b0cf3a1342a8d68 - Sigstore transparency entry: 206989655
- Sigstore integration time:
-
Permalink:
SCAI-BIO/pytmle@c5fec1898be3cce5f6d4afdb513bb99083cb037c -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SCAI-BIO
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c5fec1898be3cce5f6d4afdb513bb99083cb037c -
Trigger Event:
push
-
Statement type: