python-iqm
Interquartile Mean pure-Python module. It contains two classes:
DictIQM
MovingIQM
DictIQM
This class is efficient for datasets in which many numbers are repeated. It should not be used for large datasets with a uniform distribution. The trade-off between accuracy and memory usage can be manged with its round_digits argument.
Usage
from iqm import DictIQM
import sys
diqm = DictIQM(round_digits=-1, tenth_precise=True)
for line in open("source1_numbers_list.txt", "r"):
diqm("source1", line)
print "# {:12,.2f} Dict IQM".format(diqm.report("source1"))
MovingIQM
This class sacrifices accuracy for speed and low memory usage.
Usage
from iqm import MovingIQM
import sys
miqm = MovingIQM(1000)
for line in open("source1_numbers_list.txt", "r"):
miqm("source1", line)
print "# {:12,.2f} Moving IQM".format(miqm.report("source1"))
License
See LICENSE.txt (MIT License).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-iqm-0.2.1.tar.gz
(4.4 kB
view details)
File details
Details for the file python-iqm-0.2.1.tar.gz.
File metadata
- Download URL: python-iqm-0.2.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a50764f03c22482b61a597195c5fe942d2cbb01ff117e08fca89a4b51131f782
|
|
| MD5 |
dcb3a3633e07d6c57da910876d5d81a8
|
|
| BLAKE2b-256 |
4fbb1e861cb154f88c883b114d827975e76ff53d512ddc2f45bc7a46d4cc4082
|