Skip to main content

clizard is a Python library for Reusable rich-based interactive CLI framework

Project description

Python Pypi Docs LOC Downloads Downloads License Forks Issues Project Status DOI Medium Colab Donate

clizard is a Python package for probability density fitting of univariate distributions for random variables. The clizard library can determine the best fit for over 90 theoretical distributions. The goodness-of-fit test is used to score for the best fit and after finding the best-fitted theoretical distribution, the loc, scale, and arg parameters are returned. It can be used for parametric, non-parametric, and discrete distributions. ⭐️Star it if you like it⭐️

Key Features

Feature Description
Parametric Fitting Fit distributions on empirical data X.
Non-Parametric Fitting Fit distributions on empirical data X using non-parametric approaches (quantile, percentiles).
Discrete Fitting Fit distributions on empirical data X using binomial distribution.
Predict Compute probabilities for response variables y.
Synthetic Data Generate synthetic data.
Plots Varoius plotting functionalities.

Resources and Links


Background

  • For the parametric approach, The clizard library can determine the best fit across 89 theoretical distributions. To score the fit, one of the scoring statistics for the good-of-fitness test can be used used, such as RSS/SSE, Wasserstein, Kolmogorov-Smirnov (KS), or Energy. After finding the best-fitted theoretical distribution, the loc, scale, and arg parameters are returned, such as mean and standard deviation for normal distribution.

  • For the non-parametric approach, the clizard library contains two methods, the quantile and percentile method. Both methods assume that the data does not follow a specific probability distribution. In the case of the quantile method, the quantiles of the data are modeled whereas for the percentile method, the percentiles are modeled.


Installation

Install clizard from PyPI
pip install clizard
Install from Github source
pip install git+https://github.com/erdogant/clizard
Imort Library
import clizard
print(clizard.__version__)

# Import library
from clizard import clizard

Examples

Example: Quick start to find best fit for your input data
# [clizard] >INFO> fit
# [clizard] >INFO> transform
# [clizard] >INFO> [norm      ] [0.00 sec] [RSS: 0.00108326] [loc=-0.048 scale=1.997]
# [clizard] >INFO> [expon     ] [0.00 sec] [RSS: 0.404237] [loc=-6.897 scale=6.849]
# [clizard] >INFO> [pareto    ] [0.00 sec] [RSS: 0.404237] [loc=-536870918.897 scale=536870912.000]
# [clizard] >INFO> [dweibull  ] [0.06 sec] [RSS: 0.0115552] [loc=-0.031 scale=1.722]
# [clizard] >INFO> [t         ] [0.59 sec] [RSS: 0.00108349] [loc=-0.048 scale=1.997]
# [clizard] >INFO> [genextreme] [0.17 sec] [RSS: 0.00300806] [loc=-0.806 scale=1.979]
# [clizard] >INFO> [gamma     ] [0.05 sec] [RSS: 0.00108459] [loc=-1862.903 scale=0.002]
# [clizard] >INFO> [lognorm   ] [0.32 sec] [RSS: 0.00121597] [loc=-110.597 scale=110.530]
# [clizard] >INFO> [beta      ] [0.10 sec] [RSS: 0.00105629] [loc=-16.364 scale=32.869]
# [clizard] >INFO> [uniform   ] [0.00 sec] [RSS: 0.287339] [loc=-6.897 scale=14.437]
# [clizard] >INFO> [loggamma  ] [0.12 sec] [RSS: 0.00109042] [loc=-370.746 scale=55.722]
# [clizard] >INFO> Compute confidence intervals [parametric]
# [clizard] >INFO> Compute significance for 9 samples.
# [clizard] >INFO> Multiple test correction method applied: [fdr_bh].
# [clizard] >INFO> Create PDF plot for the parametric method.
# [clizard] >INFO> Mark 5 significant regions
# [clizard] >INFO> Estimated distribution: beta [loc:-16.364265, scale:32.868811]

Example: Plot summary of the tested distributions

After we have a fitted model, we can make some predictions using the theoretical distributions. After making some predictions, we can plot again but now the predictions are automatically included.


Contributors

Setting up and maintaining bnlearn has been possible thanks to users and contributors. Thanks to:

Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • Yes! This library is entirely free but it runs on coffee! :) Feel free to support with a Coffee.

Buy me a coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clizard-0.2.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

clizard-0.2.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file clizard-0.2.0.tar.gz.

File metadata

  • Download URL: clizard-0.2.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clizard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ac7473fc6bc2756ca0758b2e28e6f85eaabc76e302604306c4103a57495cfd6c
MD5 3b3a28358149a4186d909ae0237eac87
BLAKE2b-256 736fedbde545e1c7b7dc7f5a5071c2daeef43972897b89d360ce993fb3113369

See more details on using hashes here.

File details

Details for the file clizard-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: clizard-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clizard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb10eebb9b6d9b9421203d89f8b2ba6e54c66824c53fd8254cd3c390bf97f7a
MD5 562d862826e98079a1984b505abd4076
BLAKE2b-256 53450c84db99708796ba9f31a09535c4f55a1a8915e34baf3546d28367ea2e6b

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 Pingdom Monitoring Sentry Error logging StatusPage Status page