pragmastat 3.1.11__tar.gz → 3.1.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pragmastat might be problematic. Click here for more details.
- pragmastat-3.1.12/PKG-INFO +109 -0
- pragmastat-3.1.12/README.md +93 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat/__init__.py +1 -1
- pragmastat-3.1.12/pragmastat.egg-info/PKG-INFO +109 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pyproject.toml +2 -1
- pragmastat-3.1.11/PKG-INFO +0 -98
- pragmastat-3.1.11/README.md +0 -83
- pragmastat-3.1.11/pragmastat.egg-info/PKG-INFO +0 -98
- {pragmastat-3.1.11 → pragmastat-3.1.12}/LICENSE +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/MANIFEST.in +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/examples/demo.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat/estimators.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat/fast_center.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat/fast_spread.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat.egg-info/SOURCES.txt +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat.egg-info/dependency_links.txt +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat.egg-info/requires.txt +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/pragmastat.egg-info/top_level.txt +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/setup.cfg +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/setup.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/src/fast_center_c.c +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/src/fast_spread_c.c +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/tests/test_invariance.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/tests/test_performance.py +0 -0
- {pragmastat-3.1.11 → pragmastat-3.1.12}/tests/test_reference.py +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pragmastat
|
|
3
|
+
Version: 3.1.12
|
|
4
|
+
Summary: Pragmastat: Pragmatic Statistical Toolkit
|
|
5
|
+
Author: Andrey Akinshin
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://pragmastat.dev
|
|
8
|
+
Project-URL: Repository, https://github.com/AndreyAkinshin/pragmastat
|
|
9
|
+
Project-URL: DOI, https://doi.org/10.5281/zenodo.17236778
|
|
10
|
+
Keywords: statistics
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: numpy>=1.20
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# Pragmastat
|
|
18
|
+
|
|
19
|
+
This is a Python implementation of 'Pragmastat: Pragmatic Statistical Toolkit', which presents a toolkit of statistical procedures that provide reliable results across diverse real-world distributions, with ready-to-use implementations and detailed explanations.
|
|
20
|
+
|
|
21
|
+
- PDF manual for this version: https://pragmastat.dev/pragmastat-v3.1.12.pdf
|
|
22
|
+
- Online manual for the latest version: https://pragmastat.dev
|
|
23
|
+
- Manual DOI: [10.5281/zenodo.17236778](https://doi.org/10.5281/zenodo.17236778)
|
|
24
|
+
- Source code: https://github.com/AndreyAkinshin/pragmastat/tree/v3.1.12/python
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install pragmastat
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Demo
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from pragmastat import center, spread, rel_spread, shift, ratio, avg_spread, disparity
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def main():
|
|
39
|
+
x = [0, 2, 4, 6, 8]
|
|
40
|
+
print(center(x)) # 4
|
|
41
|
+
print(center([v + 10 for v in x])) # 14
|
|
42
|
+
print(center([v * 3 for v in x])) # 12
|
|
43
|
+
|
|
44
|
+
print(spread(x)) # 4
|
|
45
|
+
print(spread([v + 10 for v in x])) # 4
|
|
46
|
+
print(spread([v * 2 for v in x])) # 8
|
|
47
|
+
|
|
48
|
+
print(rel_spread(x)) # 1
|
|
49
|
+
print(rel_spread([v * 5 for v in x])) # 1
|
|
50
|
+
|
|
51
|
+
y = [10, 12, 14, 16, 18]
|
|
52
|
+
print(shift(x, y)) # -10
|
|
53
|
+
print(shift(x, x)) # 0
|
|
54
|
+
print(shift([v + 7 for v in x], [v + 3 for v in y])) # -6
|
|
55
|
+
print(shift([v * 2 for v in x], [v * 2 for v in y])) # -20
|
|
56
|
+
print(shift(y, x)) # 10
|
|
57
|
+
|
|
58
|
+
x = [1, 2, 4, 8, 16]
|
|
59
|
+
y = [2, 4, 8, 16, 32]
|
|
60
|
+
print(ratio(x, y)) # 0.5
|
|
61
|
+
print(ratio(x, x)) # 1
|
|
62
|
+
print(ratio([v * 2 for v in x], [v * 5 for v in y])) # 0.2
|
|
63
|
+
|
|
64
|
+
x = [0, 3, 6, 9, 12]
|
|
65
|
+
y = [0, 2, 4, 6, 8]
|
|
66
|
+
print(spread(x)) # 6
|
|
67
|
+
print(spread(y)) # 4
|
|
68
|
+
|
|
69
|
+
print(avg_spread(x, y)) # 5
|
|
70
|
+
print(avg_spread(x, x)) # 6
|
|
71
|
+
print(avg_spread([v * 2 for v in x], [v * 3 for v in x])) # 15
|
|
72
|
+
print(avg_spread(y, x)) # 5
|
|
73
|
+
print(avg_spread([v * 2 for v in x], [v * 2 for v in y])) # 10
|
|
74
|
+
|
|
75
|
+
print(shift(x, y)) # 2
|
|
76
|
+
print(avg_spread(x, y)) # 5
|
|
77
|
+
|
|
78
|
+
print(disparity(x, y)) # 0.4
|
|
79
|
+
print(disparity([v + 5 for v in x], [v + 5 for v in y])) # 0.4
|
|
80
|
+
print(disparity([v * 2 for v in x], [v * 2 for v in y])) # 0.4
|
|
81
|
+
print(disparity(y, x)) # -0.4
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
main()
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## The MIT License
|
|
89
|
+
|
|
90
|
+
Copyright (c) 2025 Andrey Akinshin
|
|
91
|
+
|
|
92
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
93
|
+
a copy of this software and associated documentation files (the
|
|
94
|
+
"Software"), to deal in the Software without restriction, including
|
|
95
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
96
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
97
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
98
|
+
the following conditions:
|
|
99
|
+
|
|
100
|
+
The above copyright notice and this permission notice shall be
|
|
101
|
+
included in all copies or substantial portions of the Software.
|
|
102
|
+
|
|
103
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
104
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
105
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
106
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
107
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
108
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
109
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Pragmastat
|
|
2
|
+
|
|
3
|
+
This is a Python implementation of 'Pragmastat: Pragmatic Statistical Toolkit', which presents a toolkit of statistical procedures that provide reliable results across diverse real-world distributions, with ready-to-use implementations and detailed explanations.
|
|
4
|
+
|
|
5
|
+
- PDF manual for this version: https://pragmastat.dev/pragmastat-v3.1.12.pdf
|
|
6
|
+
- Online manual for the latest version: https://pragmastat.dev
|
|
7
|
+
- Manual DOI: [10.5281/zenodo.17236778](https://doi.org/10.5281/zenodo.17236778)
|
|
8
|
+
- Source code: https://github.com/AndreyAkinshin/pragmastat/tree/v3.1.12/python
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install pragmastat
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Demo
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from pragmastat import center, spread, rel_spread, shift, ratio, avg_spread, disparity
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main():
|
|
23
|
+
x = [0, 2, 4, 6, 8]
|
|
24
|
+
print(center(x)) # 4
|
|
25
|
+
print(center([v + 10 for v in x])) # 14
|
|
26
|
+
print(center([v * 3 for v in x])) # 12
|
|
27
|
+
|
|
28
|
+
print(spread(x)) # 4
|
|
29
|
+
print(spread([v + 10 for v in x])) # 4
|
|
30
|
+
print(spread([v * 2 for v in x])) # 8
|
|
31
|
+
|
|
32
|
+
print(rel_spread(x)) # 1
|
|
33
|
+
print(rel_spread([v * 5 for v in x])) # 1
|
|
34
|
+
|
|
35
|
+
y = [10, 12, 14, 16, 18]
|
|
36
|
+
print(shift(x, y)) # -10
|
|
37
|
+
print(shift(x, x)) # 0
|
|
38
|
+
print(shift([v + 7 for v in x], [v + 3 for v in y])) # -6
|
|
39
|
+
print(shift([v * 2 for v in x], [v * 2 for v in y])) # -20
|
|
40
|
+
print(shift(y, x)) # 10
|
|
41
|
+
|
|
42
|
+
x = [1, 2, 4, 8, 16]
|
|
43
|
+
y = [2, 4, 8, 16, 32]
|
|
44
|
+
print(ratio(x, y)) # 0.5
|
|
45
|
+
print(ratio(x, x)) # 1
|
|
46
|
+
print(ratio([v * 2 for v in x], [v * 5 for v in y])) # 0.2
|
|
47
|
+
|
|
48
|
+
x = [0, 3, 6, 9, 12]
|
|
49
|
+
y = [0, 2, 4, 6, 8]
|
|
50
|
+
print(spread(x)) # 6
|
|
51
|
+
print(spread(y)) # 4
|
|
52
|
+
|
|
53
|
+
print(avg_spread(x, y)) # 5
|
|
54
|
+
print(avg_spread(x, x)) # 6
|
|
55
|
+
print(avg_spread([v * 2 for v in x], [v * 3 for v in x])) # 15
|
|
56
|
+
print(avg_spread(y, x)) # 5
|
|
57
|
+
print(avg_spread([v * 2 for v in x], [v * 2 for v in y])) # 10
|
|
58
|
+
|
|
59
|
+
print(shift(x, y)) # 2
|
|
60
|
+
print(avg_spread(x, y)) # 5
|
|
61
|
+
|
|
62
|
+
print(disparity(x, y)) # 0.4
|
|
63
|
+
print(disparity([v + 5 for v in x], [v + 5 for v in y])) # 0.4
|
|
64
|
+
print(disparity([v * 2 for v in x], [v * 2 for v in y])) # 0.4
|
|
65
|
+
print(disparity(y, x)) # -0.4
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if __name__ == "__main__":
|
|
69
|
+
main()
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## The MIT License
|
|
73
|
+
|
|
74
|
+
Copyright (c) 2025 Andrey Akinshin
|
|
75
|
+
|
|
76
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
77
|
+
a copy of this software and associated documentation files (the
|
|
78
|
+
"Software"), to deal in the Software without restriction, including
|
|
79
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
80
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
81
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
82
|
+
the following conditions:
|
|
83
|
+
|
|
84
|
+
The above copyright notice and this permission notice shall be
|
|
85
|
+
included in all copies or substantial portions of the Software.
|
|
86
|
+
|
|
87
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
88
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
89
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
90
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
91
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
92
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
93
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pragmastat
|
|
3
|
+
Version: 3.1.12
|
|
4
|
+
Summary: Pragmastat: Pragmatic Statistical Toolkit
|
|
5
|
+
Author: Andrey Akinshin
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://pragmastat.dev
|
|
8
|
+
Project-URL: Repository, https://github.com/AndreyAkinshin/pragmastat
|
|
9
|
+
Project-URL: DOI, https://doi.org/10.5281/zenodo.17236778
|
|
10
|
+
Keywords: statistics
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: numpy>=1.20
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# Pragmastat
|
|
18
|
+
|
|
19
|
+
This is a Python implementation of 'Pragmastat: Pragmatic Statistical Toolkit', which presents a toolkit of statistical procedures that provide reliable results across diverse real-world distributions, with ready-to-use implementations and detailed explanations.
|
|
20
|
+
|
|
21
|
+
- PDF manual for this version: https://pragmastat.dev/pragmastat-v3.1.12.pdf
|
|
22
|
+
- Online manual for the latest version: https://pragmastat.dev
|
|
23
|
+
- Manual DOI: [10.5281/zenodo.17236778](https://doi.org/10.5281/zenodo.17236778)
|
|
24
|
+
- Source code: https://github.com/AndreyAkinshin/pragmastat/tree/v3.1.12/python
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install pragmastat
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Demo
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from pragmastat import center, spread, rel_spread, shift, ratio, avg_spread, disparity
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def main():
|
|
39
|
+
x = [0, 2, 4, 6, 8]
|
|
40
|
+
print(center(x)) # 4
|
|
41
|
+
print(center([v + 10 for v in x])) # 14
|
|
42
|
+
print(center([v * 3 for v in x])) # 12
|
|
43
|
+
|
|
44
|
+
print(spread(x)) # 4
|
|
45
|
+
print(spread([v + 10 for v in x])) # 4
|
|
46
|
+
print(spread([v * 2 for v in x])) # 8
|
|
47
|
+
|
|
48
|
+
print(rel_spread(x)) # 1
|
|
49
|
+
print(rel_spread([v * 5 for v in x])) # 1
|
|
50
|
+
|
|
51
|
+
y = [10, 12, 14, 16, 18]
|
|
52
|
+
print(shift(x, y)) # -10
|
|
53
|
+
print(shift(x, x)) # 0
|
|
54
|
+
print(shift([v + 7 for v in x], [v + 3 for v in y])) # -6
|
|
55
|
+
print(shift([v * 2 for v in x], [v * 2 for v in y])) # -20
|
|
56
|
+
print(shift(y, x)) # 10
|
|
57
|
+
|
|
58
|
+
x = [1, 2, 4, 8, 16]
|
|
59
|
+
y = [2, 4, 8, 16, 32]
|
|
60
|
+
print(ratio(x, y)) # 0.5
|
|
61
|
+
print(ratio(x, x)) # 1
|
|
62
|
+
print(ratio([v * 2 for v in x], [v * 5 for v in y])) # 0.2
|
|
63
|
+
|
|
64
|
+
x = [0, 3, 6, 9, 12]
|
|
65
|
+
y = [0, 2, 4, 6, 8]
|
|
66
|
+
print(spread(x)) # 6
|
|
67
|
+
print(spread(y)) # 4
|
|
68
|
+
|
|
69
|
+
print(avg_spread(x, y)) # 5
|
|
70
|
+
print(avg_spread(x, x)) # 6
|
|
71
|
+
print(avg_spread([v * 2 for v in x], [v * 3 for v in x])) # 15
|
|
72
|
+
print(avg_spread(y, x)) # 5
|
|
73
|
+
print(avg_spread([v * 2 for v in x], [v * 2 for v in y])) # 10
|
|
74
|
+
|
|
75
|
+
print(shift(x, y)) # 2
|
|
76
|
+
print(avg_spread(x, y)) # 5
|
|
77
|
+
|
|
78
|
+
print(disparity(x, y)) # 0.4
|
|
79
|
+
print(disparity([v + 5 for v in x], [v + 5 for v in y])) # 0.4
|
|
80
|
+
print(disparity([v * 2 for v in x], [v * 2 for v in y])) # 0.4
|
|
81
|
+
print(disparity(y, x)) # -0.4
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
main()
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## The MIT License
|
|
89
|
+
|
|
90
|
+
Copyright (c) 2025 Andrey Akinshin
|
|
91
|
+
|
|
92
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
93
|
+
a copy of this software and associated documentation files (the
|
|
94
|
+
"Software"), to deal in the Software without restriction, including
|
|
95
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
96
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
97
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
98
|
+
the following conditions:
|
|
99
|
+
|
|
100
|
+
The above copyright notice and this permission notice shall be
|
|
101
|
+
included in all copies or substantial portions of the Software.
|
|
102
|
+
|
|
103
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
104
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
105
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
106
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
107
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
108
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
109
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pragmastat"
|
|
3
|
-
version = "3.1.
|
|
3
|
+
version = "3.1.12"
|
|
4
4
|
description = "Pragmastat: Pragmatic Statistical Toolkit"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.8"
|
|
7
7
|
license = "MIT"
|
|
8
8
|
authors = [{ name = "Andrey Akinshin" }]
|
|
9
9
|
dependencies = ["numpy>=1.20"]
|
|
10
|
+
keywords = ["statistics"]
|
|
10
11
|
|
|
11
12
|
[project.urls]
|
|
12
13
|
Homepage = "https://pragmastat.dev"
|
pragmastat-3.1.11/PKG-INFO
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pragmastat
|
|
3
|
-
Version: 3.1.11
|
|
4
|
-
Summary: Pragmastat: Pragmatic Statistical Toolkit
|
|
5
|
-
Author: Andrey Akinshin
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://pragmastat.dev
|
|
8
|
-
Project-URL: Repository, https://github.com/AndreyAkinshin/pragmastat
|
|
9
|
-
Project-URL: DOI, https://doi.org/10.5281/zenodo.17236778
|
|
10
|
-
Requires-Python: >=3.8
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Dist: numpy>=1.20
|
|
14
|
-
Dynamic: license-file
|
|
15
|
-
|
|
16
|
-
# Pragmastat
|
|
17
|
-
|
|
18
|
-
A Python implementation of 'Pragmastat: Pragmatic Statistical Toolkit' - robust summary estimators designed for real-world data analysis.
|
|
19
|
-
Online manual: https://pragmastat.dev
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pip install pragmastat
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Demo
|
|
28
|
-
|
|
29
|
-
```python
|
|
30
|
-
from pragmastat import center, spread, rel_spread, shift, ratio, avg_spread, disparity
|
|
31
|
-
|
|
32
|
-
x = [0, 2, 4, 6, 8]
|
|
33
|
-
print(center(x)) # 4
|
|
34
|
-
print(center([v + 10 for v in x])) # 14
|
|
35
|
-
print(center([v * 3 for v in x])) # 12
|
|
36
|
-
|
|
37
|
-
print(spread(x)) # 4
|
|
38
|
-
print(spread([v + 10 for v in x])) # 4
|
|
39
|
-
print(spread([v * 2 for v in x])) # 8
|
|
40
|
-
|
|
41
|
-
print(rel_spread(x)) # 1
|
|
42
|
-
print(rel_spread([v * 5 for v in x])) # 1
|
|
43
|
-
|
|
44
|
-
y = [10, 12, 14, 16, 18]
|
|
45
|
-
print(shift(x, y)) # -10
|
|
46
|
-
print(shift(x, x)) # 0
|
|
47
|
-
print(shift([v + 7 for v in x], [v + 3 for v in y])) # -6
|
|
48
|
-
print(shift([v * 2 for v in x], [v * 2 for v in y])) # -20
|
|
49
|
-
print(shift(y, x)) # 10
|
|
50
|
-
|
|
51
|
-
x = [1, 2, 4, 8, 16]
|
|
52
|
-
y = [2, 4, 8, 16, 32]
|
|
53
|
-
print(ratio(x, y)) # 0.5
|
|
54
|
-
print(ratio(x, x)) # 1
|
|
55
|
-
print(ratio([v * 2 for v in x], [v * 5 for v in y])) # 0.2
|
|
56
|
-
|
|
57
|
-
x = [0, 3, 6, 9, 12]
|
|
58
|
-
y = [0, 2, 4, 6, 8]
|
|
59
|
-
print(spread(x)) # 6
|
|
60
|
-
print(spread(y)) # 4
|
|
61
|
-
|
|
62
|
-
print(avg_spread(x, y)) # 5
|
|
63
|
-
print(avg_spread(x, x)) # 6
|
|
64
|
-
print(avg_spread([v * 2 for v in x], [v * 3 for v in x])) # 15
|
|
65
|
-
print(avg_spread(y, x)) # 5
|
|
66
|
-
print(avg_spread([v * 2 for v in x], [v * 2 for v in y])) # 10
|
|
67
|
-
|
|
68
|
-
print(shift(x, y)) # 2
|
|
69
|
-
print(avg_spread(x, y)) # 5
|
|
70
|
-
|
|
71
|
-
print(disparity(x, y)) # 0.4
|
|
72
|
-
print(disparity([v + 5 for v in x], [v + 5 for v in y])) # 0.4
|
|
73
|
-
print(disparity([v * 2 for v in x], [v * 2 for v in y])) # 0.4
|
|
74
|
-
print(disparity(y, x)) # -0.4
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## The MIT License
|
|
78
|
-
|
|
79
|
-
Copyright (c) 2025 Andrey Akinshin
|
|
80
|
-
|
|
81
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
82
|
-
a copy of this software and associated documentation files (the
|
|
83
|
-
"Software"), to deal in the Software without restriction, including
|
|
84
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
85
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
86
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
87
|
-
the following conditions:
|
|
88
|
-
|
|
89
|
-
The above copyright notice and this permission notice shall be
|
|
90
|
-
included in all copies or substantial portions of the Software.
|
|
91
|
-
|
|
92
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
93
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
94
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
95
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
96
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
97
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
98
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
pragmastat-3.1.11/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Pragmastat
|
|
2
|
-
|
|
3
|
-
A Python implementation of 'Pragmastat: Pragmatic Statistical Toolkit' - robust summary estimators designed for real-world data analysis.
|
|
4
|
-
Online manual: https://pragmastat.dev
|
|
5
|
-
|
|
6
|
-
## Installation
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
pip install pragmastat
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Demo
|
|
13
|
-
|
|
14
|
-
```python
|
|
15
|
-
from pragmastat import center, spread, rel_spread, shift, ratio, avg_spread, disparity
|
|
16
|
-
|
|
17
|
-
x = [0, 2, 4, 6, 8]
|
|
18
|
-
print(center(x)) # 4
|
|
19
|
-
print(center([v + 10 for v in x])) # 14
|
|
20
|
-
print(center([v * 3 for v in x])) # 12
|
|
21
|
-
|
|
22
|
-
print(spread(x)) # 4
|
|
23
|
-
print(spread([v + 10 for v in x])) # 4
|
|
24
|
-
print(spread([v * 2 for v in x])) # 8
|
|
25
|
-
|
|
26
|
-
print(rel_spread(x)) # 1
|
|
27
|
-
print(rel_spread([v * 5 for v in x])) # 1
|
|
28
|
-
|
|
29
|
-
y = [10, 12, 14, 16, 18]
|
|
30
|
-
print(shift(x, y)) # -10
|
|
31
|
-
print(shift(x, x)) # 0
|
|
32
|
-
print(shift([v + 7 for v in x], [v + 3 for v in y])) # -6
|
|
33
|
-
print(shift([v * 2 for v in x], [v * 2 for v in y])) # -20
|
|
34
|
-
print(shift(y, x)) # 10
|
|
35
|
-
|
|
36
|
-
x = [1, 2, 4, 8, 16]
|
|
37
|
-
y = [2, 4, 8, 16, 32]
|
|
38
|
-
print(ratio(x, y)) # 0.5
|
|
39
|
-
print(ratio(x, x)) # 1
|
|
40
|
-
print(ratio([v * 2 for v in x], [v * 5 for v in y])) # 0.2
|
|
41
|
-
|
|
42
|
-
x = [0, 3, 6, 9, 12]
|
|
43
|
-
y = [0, 2, 4, 6, 8]
|
|
44
|
-
print(spread(x)) # 6
|
|
45
|
-
print(spread(y)) # 4
|
|
46
|
-
|
|
47
|
-
print(avg_spread(x, y)) # 5
|
|
48
|
-
print(avg_spread(x, x)) # 6
|
|
49
|
-
print(avg_spread([v * 2 for v in x], [v * 3 for v in x])) # 15
|
|
50
|
-
print(avg_spread(y, x)) # 5
|
|
51
|
-
print(avg_spread([v * 2 for v in x], [v * 2 for v in y])) # 10
|
|
52
|
-
|
|
53
|
-
print(shift(x, y)) # 2
|
|
54
|
-
print(avg_spread(x, y)) # 5
|
|
55
|
-
|
|
56
|
-
print(disparity(x, y)) # 0.4
|
|
57
|
-
print(disparity([v + 5 for v in x], [v + 5 for v in y])) # 0.4
|
|
58
|
-
print(disparity([v * 2 for v in x], [v * 2 for v in y])) # 0.4
|
|
59
|
-
print(disparity(y, x)) # -0.4
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## The MIT License
|
|
63
|
-
|
|
64
|
-
Copyright (c) 2025 Andrey Akinshin
|
|
65
|
-
|
|
66
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
67
|
-
a copy of this software and associated documentation files (the
|
|
68
|
-
"Software"), to deal in the Software without restriction, including
|
|
69
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
70
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
71
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
72
|
-
the following conditions:
|
|
73
|
-
|
|
74
|
-
The above copyright notice and this permission notice shall be
|
|
75
|
-
included in all copies or substantial portions of the Software.
|
|
76
|
-
|
|
77
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
78
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
79
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
80
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
81
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
82
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
83
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pragmastat
|
|
3
|
-
Version: 3.1.11
|
|
4
|
-
Summary: Pragmastat: Pragmatic Statistical Toolkit
|
|
5
|
-
Author: Andrey Akinshin
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://pragmastat.dev
|
|
8
|
-
Project-URL: Repository, https://github.com/AndreyAkinshin/pragmastat
|
|
9
|
-
Project-URL: DOI, https://doi.org/10.5281/zenodo.17236778
|
|
10
|
-
Requires-Python: >=3.8
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Dist: numpy>=1.20
|
|
14
|
-
Dynamic: license-file
|
|
15
|
-
|
|
16
|
-
# Pragmastat
|
|
17
|
-
|
|
18
|
-
A Python implementation of 'Pragmastat: Pragmatic Statistical Toolkit' - robust summary estimators designed for real-world data analysis.
|
|
19
|
-
Online manual: https://pragmastat.dev
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pip install pragmastat
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Demo
|
|
28
|
-
|
|
29
|
-
```python
|
|
30
|
-
from pragmastat import center, spread, rel_spread, shift, ratio, avg_spread, disparity
|
|
31
|
-
|
|
32
|
-
x = [0, 2, 4, 6, 8]
|
|
33
|
-
print(center(x)) # 4
|
|
34
|
-
print(center([v + 10 for v in x])) # 14
|
|
35
|
-
print(center([v * 3 for v in x])) # 12
|
|
36
|
-
|
|
37
|
-
print(spread(x)) # 4
|
|
38
|
-
print(spread([v + 10 for v in x])) # 4
|
|
39
|
-
print(spread([v * 2 for v in x])) # 8
|
|
40
|
-
|
|
41
|
-
print(rel_spread(x)) # 1
|
|
42
|
-
print(rel_spread([v * 5 for v in x])) # 1
|
|
43
|
-
|
|
44
|
-
y = [10, 12, 14, 16, 18]
|
|
45
|
-
print(shift(x, y)) # -10
|
|
46
|
-
print(shift(x, x)) # 0
|
|
47
|
-
print(shift([v + 7 for v in x], [v + 3 for v in y])) # -6
|
|
48
|
-
print(shift([v * 2 for v in x], [v * 2 for v in y])) # -20
|
|
49
|
-
print(shift(y, x)) # 10
|
|
50
|
-
|
|
51
|
-
x = [1, 2, 4, 8, 16]
|
|
52
|
-
y = [2, 4, 8, 16, 32]
|
|
53
|
-
print(ratio(x, y)) # 0.5
|
|
54
|
-
print(ratio(x, x)) # 1
|
|
55
|
-
print(ratio([v * 2 for v in x], [v * 5 for v in y])) # 0.2
|
|
56
|
-
|
|
57
|
-
x = [0, 3, 6, 9, 12]
|
|
58
|
-
y = [0, 2, 4, 6, 8]
|
|
59
|
-
print(spread(x)) # 6
|
|
60
|
-
print(spread(y)) # 4
|
|
61
|
-
|
|
62
|
-
print(avg_spread(x, y)) # 5
|
|
63
|
-
print(avg_spread(x, x)) # 6
|
|
64
|
-
print(avg_spread([v * 2 for v in x], [v * 3 for v in x])) # 15
|
|
65
|
-
print(avg_spread(y, x)) # 5
|
|
66
|
-
print(avg_spread([v * 2 for v in x], [v * 2 for v in y])) # 10
|
|
67
|
-
|
|
68
|
-
print(shift(x, y)) # 2
|
|
69
|
-
print(avg_spread(x, y)) # 5
|
|
70
|
-
|
|
71
|
-
print(disparity(x, y)) # 0.4
|
|
72
|
-
print(disparity([v + 5 for v in x], [v + 5 for v in y])) # 0.4
|
|
73
|
-
print(disparity([v * 2 for v in x], [v * 2 for v in y])) # 0.4
|
|
74
|
-
print(disparity(y, x)) # -0.4
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## The MIT License
|
|
78
|
-
|
|
79
|
-
Copyright (c) 2025 Andrey Akinshin
|
|
80
|
-
|
|
81
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
82
|
-
a copy of this software and associated documentation files (the
|
|
83
|
-
"Software"), to deal in the Software without restriction, including
|
|
84
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
85
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
86
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
87
|
-
the following conditions:
|
|
88
|
-
|
|
89
|
-
The above copyright notice and this permission notice shall be
|
|
90
|
-
included in all copies or substantial portions of the Software.
|
|
91
|
-
|
|
92
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
93
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
94
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
95
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
96
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
97
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
98
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|