Skip to main content

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.

Downloads DOI

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.

Weibull probability plot with Fisher confidence bounds

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
Bias-corrected Weibull fit (C4 method) Contour plot with multiple confidence levels
Ranked by AIC Distributions compared
PlotAll().compare() ranked by AIC PlotAll().compare() PDF comparison figure

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

predictr-0.1.34.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

predictr-0.1.34-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

File details

Details for the file predictr-0.1.34.tar.gz.

File metadata

  • Download URL: predictr-0.1.34.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.7

File hashes

Hashes for predictr-0.1.34.tar.gz
Algorithm Hash digest
SHA256 13a9c50e0d4ea09759bbc7d5be8a206d1ed3125784fc435a7dcd3c8abb3df7bf
MD5 08eb9fe7cb747b23cb6e7614b28297d8
BLAKE2b-256 ed3452fdf782a2dc7a66fef3c3d33456a63a247c4b87dd39a8df09ebe0dbb900

See more details on using hashes here.

File details

Details for the file predictr-0.1.34-py3-none-any.whl.

File metadata

  • Download URL: predictr-0.1.34-py3-none-any.whl
  • Upload date:
  • Size: 60.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.7

File hashes

Hashes for predictr-0.1.34-py3-none-any.whl
Algorithm Hash digest
SHA256 b9db4bf82b5ff9c4a7fbe91b1df24775411c460995b97ec281b624155312ae3e
MD5 88a73bdb30b6fc3c78934fe36cff3003
BLAKE2b-256 89ca92a70a7466f2f3ccfc4f2539e95d4e7f9d0b8e8ba5e3d930b975daf389e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page