Skip to main content

non-normal

Generate a non-normal distributions with given a mean, variance, skewness and kurtosis using the Fleishman Method, essentially a cubic transformation on a standard normal [X~N(0, 1)]

$$ Y =a +bX +cX^2 +dX^3 $$

where the coefficients ($a, b, c, d$) are tuned to create a distribution with the desired statistic

Non-Normal Distribution Figure 1. A non-normal field generated in the usage section below. The title shows the input parameters, and the emperically measured statistics of the generated distribution

Installation

Installs cleanly with a single invocation of the standard Python package tool:

$ pip install non-normal

Usage

from non_normal import fleishman

# Input parameters for non-normal field
mean = 0
var = 1
skew = 1
ekurt = 2
size = 2**20

# Create an instance of the Fleishman class
ff = fleishman.Fleishman(mean=mean, var=var, skew=skew, ekurt=ekurt, size=size)

# Generate the field
ff.gen_field()
non_normal_data = ff.field

# Measure the stats of the generated samples
ff.field_stats

>>> {'mean':    0.000203128504124, 
     'var':     1.001352686678266, 
     'skew':    1.005612915524984, 
     'ekurt':   2.052527629375554,}

References

  1. A method for simulating non-normal distributions
  2. Functions for Simulating Data by Using Fleishman’s Transformation
  3. Generation of Non-normal Data – A Study of Fleishman’s Power Method
  4. Computing the real solutions of Fleishman's equations for simulating non-normal data
  5. Simulating multivariate nonnormal distributions
  6. https://gist.github.com/zeimusu/7432603b85dc6406c6ea

Metadata

Release files for non-normal 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for non-normal 0.1.2
File Size Uploaded Provenance Actions
non-normal-0.1.2.tar.gz 5.4 kB Without provenance Details for non-normal-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for non-normal 0.1.2
File Interpreter ABI Platform Actions
non_normal-0.1.2-py3-none-any.whl Python 3 none any Details for non_normal-0.1.2-py3-none-any.whl

Total release size: 11.1 kB

Release files / non-normal-0.1.2.tar.gz

Download URL non-normal-0.1.2.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
388a40bfb58a57a0bf9dbb244963e8f655dc22f089d92e75e8dd57cd9d643ec8
BLAKE2b-256 checksum
How to use checksums
275a1145221143314077c7b1b24f90ec3e31d02654844891ad9b86e920485b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.3 Darwin/22.4.0

Release files / non_normal-0.1.2-py3-none-any.whl

Download URL non_normal-0.1.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30820a766d3e24cbf19b73337e77aa79d7f997dfb581c3a1930465a2f8598dfb
BLAKE2b-256 checksum
How to use checksums
cea73a583059688a12a5f011238c2cb8fa8400498559681c7a13d37ae91a5eec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.3 Darwin/22.4.0

Security for non-normal 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page