predictr.
predict + reliability, in other words: A tool to predict the reliability.
predictr is a Python package for Weibull-based life data analysis (reliability engineering). It covers parameter estimation, bias-correction, confidence bounds, and publication-ready Weibull plots in a single, consistent API.
Installation
pip install predictr
Requires Python >= 3.6.
Quick start
from predictr import Analysis
failures = [0.4508831, 0.68564703, 0.76826143, 0.88231395, 1.48287253, 1.62876357]
weibull = Analysis(df=failures, bounds='fb', show=True)
weibull.mle()
print(weibull.beta, weibull.eta) # shape and scale estimates
This fits a two-parameter Weibull distribution via Maximum Likelihood Estimation, adds Fisher confidence bounds, and renders the probability plot below.
See it in action
A few of predictr's capabilities, from bias-corrected estimates to comparing entire distributions.
| Bias-corrected estimates | Confidence region, multiple levels |
|---|---|
| Ranked by AIC | Distributions compared |
|---|---|
Main features
Parameter estimation
- Uncensored and type I / type II right-censored two-parameter Weibull distribution
- Maximum Likelihood Estimation (MLE) and Median Rank Regression (MRR)
- Bx-life calculator
- Normal, LogNormal and Exponential distributions, alongside Weibull
Bias-correction
- C4 method (reduced bias adjustment)
- Hirose and Ross method
- Parametric and non-parametric bootstrap correction (mean, median, trimmed mean)
Confidence bounds
- Fisher bounds
- Likelihood Ratio bounds (Weibull, Normal, LogNormal)
- Beta-Binomial bounds
- Monte Carlo Pivotal bounds
- Parametric and non-parametric bootstrap bounds
- Exact chi-square bounds (Exponential)
Plots
- Probability plots with all relevant statistics in the legend
- Multiple fits overlaid in one figure, for design comparisons
- Contour plots for the joint confidence region of shape and scale, with support for multiple confidence levels per dataset
- Distribution comparison: fit every supported distribution to one dataset, ranked by AIC or Anderson-Darling, plus a combined PDF plot
See the class documentation for the full method and parameter reference, including censored-data and bias-correction examples.
Documentation and links
Citing predictr
If you use predictr in academic work, please cite it via its Zenodo DOI. See docs/citation.md for details.
License
MIT — see LICENSE.txt.
Contacte me
If you have any questions and / or suggestions, don't hesitate to contact me.
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 predictr-0.1.36.tar.gz.
File metadata
- Download URL: predictr-0.1.36.tar.gz
- Upload date:
- Size: 2.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7947dc1091617158e07bc446403be1c21bd2046c626b95796a99ad77b389387e
|
|
| MD5 |
40bf31d01bf46271914dec617608c9b0
|
|
| BLAKE2b-256 |
4e4463c2d5e1df86d908c803fd80ef40b7730d6dd1864629726c1421cf13f0a9
|
File details
Details for the file predictr-0.1.36-py3-none-any.whl.
File metadata
- Download URL: predictr-0.1.36-py3-none-any.whl
- Upload date:
- Size: 62.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ae7fe130541c69e7b8e40e11210416e2efd605f84dadf50816a66d42179a55c
|
|
| MD5 |
2beb8dfc43977414f5cdaf445ee0dfdb
|
|
| BLAKE2b-256 |
556e94c2c85f3f074e6fc2ac70f2fc30077682dd0e2703b80e7dc4d1c1360418
|