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.1.0.tar.gz (24.8 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.1.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for clizard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5606e00918024056f85c903abf1d441d8c2644594187680e9b65c978213fb46d
MD5 bf115e8e2aff291a8fce7e19f7b65c82
BLAKE2b-256 57b753e7bbb1818cac57292f890ef637e9fe0d77182594da5119549d69a5ca12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clizard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0807e5204e24f13f7812eba0b1dec120dc510e7c9b4b42c1cb30e8eed2f35ace
MD5 0ce703cc555bcf91c7a1aaad314c5707
BLAKE2b-256 31a6e3ae2ef37dbcd025f3b23b620ea197ffa8d7b1e959ae002e2eb975d6dcc6

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