Create series of random numbers fitting a specified distribution, and then analyze them.
Project description
Randalyze - Random Number Generator And Analyzer
What Does Randalyze Do?
Randalyze is a Python module that you can import or use directly from the command line to generate a set of random numbers. These numbers will fit a specified distribution, rather than just being evenly distributed.
It also allows you to analyze a set of numbers, to see which distribution they match.
Installation
Randalyze supports Python 3.8 and later, so you can install it on Windows 7 if you want. It doesn't support Python 2.7.
To install Randalyze, create a virtual environment and use pip
:
pip install randalyze
Usage
Command Line Usage
Generating Random Numbers
The generate
command creates a number of random numbers. The type of generator must be specified - currently the only option is benford
, and the number (or count) of numbers generated is specified with the -c
option.
For example, to generate 100 random numbers with a Benford distribution, the following command line can be used:
randalyze generate -c 100 benford
or, if you're not using an active virtual environment:
python -m randalyze generate -c 100 benford
For detailled parameter descriptions, use:
randalyze --help
randalyze generate --help
Analyzing Numbers
If you have a set of numbers, randalyze
can analyze them and tell you how close to a Benford distribution they are. These numbers may have been generated by randalyze
, or maybe obtained from somewhere else - it really doesn't matter.
Currently the randalyze analyze
command accepts numbers piped from another command, and compares their distribution to the Benford distribution.
So, to analyze an output of 10,000 numbers from the randalyze generate
command, and see whether it matches a Benford distribution to within 10%, use:
randalyze generate benford -c 10000 | randalyze analyze -t 10
And to ensure the numbers in a text file numbers.txt
, with one number per line, fit a Benford distribution:
cat numbers.txt | randalyze analyze -t 10
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
Built Distribution
Hashes for randalyze-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ff0711001f51fec88b9412297b168cb61bac5922c53eccdbe1d536088084f2e |
|
MD5 | 9af10e084b9553fb8e5875806bb490d3 |
|
BLAKE2b-256 | de80fe445ba537ea56ce1599a787a060d47552871e92ea951d4d69c2b06a72c8 |