aggregationslib 0.1.5.dev1__tar.gz → 0.1.5.dev2__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.
- {aggregationslib-0.1.5.dev1/aggregationslib.egg-info → aggregationslib-0.1.5.dev2}/PKG-INFO +21 -21
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/README.md +18 -20
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/README.rst +19 -19
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2/aggregationslib.egg-info}/PKG-INFO +21 -21
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/pyproject.toml +1 -1
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/.github/workflows/python-publish.yml +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/.gitignore +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/LICENSE +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/__init__.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/aggregation.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/aggregations.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/conjuctive/__init__.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/conjuctive/purepython.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/decimalaggregations.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/disjunctive/__init__.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/example.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/purepython.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/SOURCES.txt +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/dependency_links.txt +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/requires.txt +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/top_level.txt +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/setup.cfg +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/tests/__init__.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/tests/test_aggregations.py +0 -0
- {aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/tests/test_decimal_exponential_mean.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: aggregationslib
|
|
3
|
-
Version: 0.1.5.
|
|
3
|
+
Version: 0.1.5.dev2
|
|
4
4
|
Summary: Python implementation of Arithmetic, quasi arithmetic and other aggregating functions
|
|
5
5
|
Author: wgalka
|
|
6
6
|
Project-URL: Homepage, https://github.com/wgalka/Means
|
|
7
7
|
Project-URL: Download, https://github.com/wgalka/Means/releases/latest
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/x-rst
|
|
@@ -81,29 +81,29 @@ fulfills two boundary conditions, namely :math:`A(0,\dots,0) = 0`,
|
|
|
81
81
|
|
|
82
82
|
The floowoing aggregation functions are implemented in this library:
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
:math:`\mathbf{A_{ar}}` **- Arithmetic mean**
|
|
85
85
|
|
|
86
86
|
.. math:: A_{ar}(x_1,...,x_n)=\frac{1}{n}\sum \limits_{k=1}^{n} x_k
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
:math:`\mathbf{A_{qd}}` **- Quadratic mean**
|
|
89
89
|
|
|
90
90
|
.. math::
|
|
91
91
|
|
|
92
92
|
A_{qd}(x_1,...,x_n)=\sqrt{\frac{1}{n}\sum
|
|
93
93
|
\limits_{k=1}^{n} x_k^2}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
:math:`\mathbf{A_{pr}}` **- Product aggregation**
|
|
96
96
|
|
|
97
|
-
.. math:: A_{
|
|
97
|
+
.. math:: A_{pr}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
:math:`\mathbf{A_{gm}}` **- Geometric mean**
|
|
100
100
|
|
|
101
101
|
.. math::
|
|
102
102
|
|
|
103
103
|
A_{gm}(x_1,...,x_n)=\sqrt[n]{\prod
|
|
104
104
|
\limits_{k=1}^{n} x_k}
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
:math:`\mathbf{A_{hm}}` **- Harmonic mean**
|
|
107
107
|
|
|
108
108
|
.. math::
|
|
109
109
|
|
|
@@ -114,7 +114,7 @@ The floowoing aggregation functions are implemented in this library:
|
|
|
114
114
|
\frac{n}{\sum\limits_{k=1}^{n} \frac{1}{x_k}}, & \text{otherwise}
|
|
115
115
|
\end{cases}
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
:math:`\mathbf{A_{pw}^{(r)}}` **- Power mean**
|
|
118
118
|
|
|
119
119
|
.. math::
|
|
120
120
|
|
|
@@ -132,7 +132,7 @@ where r=-1; - Geometric Mean obtained as the limit
|
|
|
132
132
|
|
|
133
133
|
--------------
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
:math:`\mathbf{A_{ex}^{(r)}}` **- Exponential mean**
|
|
136
136
|
|
|
137
137
|
.. math::
|
|
138
138
|
|
|
@@ -140,18 +140,18 @@ where r=-1; - Geometric Mean obtained as the limit
|
|
|
140
140
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
141
141
|
} r \in \mathbb{R}$, $r \neq 0
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
:math:`\mathbf{A_{lm}}` **- Lehmer mean**
|
|
144
144
|
|
|
145
|
-
.. math::
|
|
145
|
+
.. math:: A_{lm}(x_1,...,x_n)= \frac{\sum \limits_{k=1}^{n}x_k^r}{\sum \limits_{k=1}^{n}x_k^{r-1}}
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
:math:`\mathbf{A_{amn}^{(p)}}` **- Arithmetic minimum mean**
|
|
148
148
|
|
|
149
149
|
.. math::
|
|
150
150
|
|
|
151
151
|
A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
152
152
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
:math:`\mathbf{A_{amx}^{(p)}}` **- Arithmetic maximum mean**
|
|
155
155
|
|
|
156
156
|
.. math::
|
|
157
157
|
|
|
@@ -165,7 +165,7 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
165
165
|
calculation of the median and the Olympic aggregation are reduced to the
|
|
166
166
|
case of calculating the arithmetic mean of the given values.
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
:math:`\mathbf{A_{md}}` **- Median - ordered weighted aggregation**
|
|
169
169
|
|
|
170
170
|
.. math::
|
|
171
171
|
|
|
@@ -175,15 +175,15 @@ case of calculating the arithmetic mean of the given values.
|
|
|
175
175
|
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
176
176
|
\end{cases},
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
:math:`\mathbf{A_{ol}}` **- Olimpic aggregation**
|
|
179
179
|
|
|
180
180
|
.. math:: A_{ol}(x_1,\dots,x_n) = \frac{1}{n-2} \sum \limits_{k=2}^{n-1} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
181
181
|
|
|
182
|
-
:math:`\mathbf{A_{oln}^{p}}` **- Olimpic aggregation**
|
|
182
|
+
:math:`\mathbf{A_{oln}^{(p)}}` **- Olimpic aggregation**
|
|
183
183
|
|
|
184
184
|
We can specify how many greatest and smallest records remove
|
|
185
185
|
|
|
186
|
-
.. math:: A_{oln}^{p}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
186
|
+
.. math:: A_{oln}^{(p)}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
187
187
|
|
|
188
188
|
--------------
|
|
189
189
|
|
|
@@ -196,11 +196,11 @@ https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_
|
|
|
196
196
|
|
|
197
197
|
A_{ln}\left(x_1, x_2, \ldots, x_n\right)=(n-1) ! \sum_{i=1}^n \frac{x_i}{\prod_{\substack{j=1 \\ j \neq i}}^n \log \left(x_i / x_j\right)}
|
|
198
198
|
|
|
199
|
-
:math:`A^
|
|
200
|
-
|
|
199
|
+
:math:`A^{(p)}_{A_1,A_2}` - Convex combinations of aggregation functions
|
|
200
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
201
201
|
|
|
202
202
|
We can construct covex combination of aggregation functions as
|
|
203
|
-
:math:`A^
|
|
203
|
+
:math:`A^{(p)}_{A_1,A_2}=pA_1+(1-p)A_2`, where :math:`A_1, A_2` are
|
|
204
204
|
aggregation functions and :math:`p \in [0,1]`.
|
|
205
205
|
|
|
206
206
|
References
|
|
@@ -54,27 +54,25 @@ fulfills two boundary conditions, namely $A(0,\dots,0) = 0$, $A(1,\dots,1) = 1$.
|
|
|
54
54
|
|
|
55
55
|
The floowoing aggregation functions are implemented in this library:
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
$\mathbf{A_{ar}}$ **- Arithmetic mean**
|
|
58
58
|
|
|
59
59
|
$$A_{ar}(x_1,...,x_n)=\frac{1}{n}\sum \limits_{k=1}^{n} x_k$$
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
$\mathbf{A_{qd}}$ **- Quadratic mean**
|
|
62
62
|
|
|
63
63
|
$$A_{qd}(x_1,...,x_n)=\sqrt{\frac{1}{n}\sum
|
|
64
64
|
\limits_{k=1}^{n} x_k^2}$$
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
$\mathbf{A_{pr}}$ **- Product aggregation**
|
|
67
67
|
|
|
68
|
-
$$A_{
|
|
68
|
+
$$A_{pr}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k$$
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
$\mathbf{A_{gm}}$ **- Geometric mean**
|
|
71
71
|
|
|
72
72
|
$$A_{gm}(x_1,...,x_n)=\sqrt[n]{\prod
|
|
73
73
|
\limits_{k=1}^{n} x_k}$$
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
$\mathbf{A_{hm}}$ **- Harmonic mean**
|
|
78
76
|
|
|
79
77
|
$$
|
|
80
78
|
A_{hm}(x_1,...,x_n) =
|
|
@@ -85,7 +83,7 @@ A_{hm}(x_1,...,x_n) =
|
|
|
85
83
|
$$
|
|
86
84
|
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
$\mathbf{A_{pw}^{(r)}}$ **- Power mean**
|
|
89
87
|
|
|
90
88
|
$$
|
|
91
89
|
A_{pw}^{(r)}(x_1,...,x_n) =
|
|
@@ -105,22 +103,22 @@ special cases of power means $A_{\text{pw}}^r$ [1] are:
|
|
|
105
103
|
|
|
106
104
|
----
|
|
107
105
|
|
|
108
|
-
|
|
106
|
+
$\mathbf{A_{ex}^{(r)}}$ **- Exponential mean**
|
|
109
107
|
|
|
110
108
|
$$A_{ex}^{(r)}(x_1,...,x_n)= \frac{1}{r}\ln
|
|
111
109
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
112
110
|
} r \in \mathbb{R}$, $r \neq 0$$
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
$\mathbf{A_{lm}}$ **- Lehmer mean**
|
|
115
113
|
|
|
116
|
-
$$
|
|
114
|
+
$$A_{lm}(x_1,...,x_n)= \frac{\sum \limits_{k=1}^{n}x_k^r}{\sum \limits_{k=1}^{n}x_k^{r-1}} $$
|
|
117
115
|
|
|
118
|
-
|
|
116
|
+
$\mathbf{A_{amn}^{(p)}}$ **- Arithmetic minimum mean**
|
|
119
117
|
|
|
120
118
|
$$A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
121
119
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,$$
|
|
122
120
|
|
|
123
|
-
|
|
121
|
+
$\mathbf{A_{amx}^{(p)}}$ **- Arithmetic maximum mean**
|
|
124
122
|
|
|
125
123
|
$$A_{amx}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
126
124
|
(1-p) \max \limits_{1\leq k \leq n}x_k,$$
|
|
@@ -132,7 +130,7 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
132
130
|
calculation of the median and the Olympic aggregation are reduced to the case of calculating the
|
|
133
131
|
arithmetic mean of the given values.
|
|
134
132
|
|
|
135
|
-
|
|
133
|
+
$\mathbf{A_{md}}$ **- Median - ordered weighted aggregation**
|
|
136
134
|
|
|
137
135
|
$$A_{md}(x_1,\dots,x_n) =
|
|
138
136
|
\begin{cases}
|
|
@@ -140,15 +138,15 @@ y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
|
140
138
|
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
141
139
|
\end{cases},$$
|
|
142
140
|
|
|
143
|
-
|
|
141
|
+
$\mathbf{A_{ol}}$ **- Olimpic aggregation**
|
|
144
142
|
|
|
145
143
|
$$ A_{ol}(x_1,\dots,x_n) = \frac{1}{n-2} \sum \limits_{k=2}^{n-1} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.$$
|
|
146
144
|
|
|
147
|
-
$\mathbf{A_{oln}^{p}}$ **- Olimpic aggregation**
|
|
145
|
+
$\mathbf{A_{oln}^{(p)}}$ **- Olimpic aggregation**
|
|
148
146
|
|
|
149
147
|
We can specify how many greatest and smallest records remove
|
|
150
148
|
|
|
151
|
-
$$ A_{oln}^{p}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.$$
|
|
149
|
+
$$ A_{oln}^{(p)}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.$$
|
|
152
150
|
|
|
153
151
|
--------------------
|
|
154
152
|
|
|
@@ -160,9 +158,9 @@ $$
|
|
|
160
158
|
A_{ln}\left(x_1, x_2, \ldots, x_n\right)=(n-1) ! \sum_{i=1}^n \frac{x_i}{\prod_{\substack{j=1 \\ j \neq i}}^n \log \left(x_i / x_j\right)}
|
|
161
159
|
$$
|
|
162
160
|
|
|
163
|
-
### $A^
|
|
161
|
+
### $A^{(p)}_{A_1,A_2}$ - Convex combinations of aggregation functions
|
|
164
162
|
|
|
165
|
-
We can construct covex combination of aggregation functions as $A^
|
|
163
|
+
We can construct covex combination of aggregation functions as $A^{(p)}_{A_1,A_2}=pA_1+(1-p)A_2$, where $A_1, A_2$ are aggregation functions and $p \in [0,1]$.
|
|
166
164
|
|
|
167
165
|
|
|
168
166
|
|
|
@@ -64,29 +64,29 @@ fulfills two boundary conditions, namely :math:`A(0,\dots,0) = 0`,
|
|
|
64
64
|
|
|
65
65
|
The floowoing aggregation functions are implemented in this library:
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
:math:`\mathbf{A_{ar}}` **- Arithmetic mean**
|
|
68
68
|
|
|
69
69
|
.. math:: A_{ar}(x_1,...,x_n)=\frac{1}{n}\sum \limits_{k=1}^{n} x_k
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
:math:`\mathbf{A_{qd}}` **- Quadratic mean**
|
|
72
72
|
|
|
73
73
|
.. math::
|
|
74
74
|
|
|
75
75
|
A_{qd}(x_1,...,x_n)=\sqrt{\frac{1}{n}\sum
|
|
76
76
|
\limits_{k=1}^{n} x_k^2}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
:math:`\mathbf{A_{pr}}` **- Product aggregation**
|
|
79
79
|
|
|
80
|
-
.. math:: A_{
|
|
80
|
+
.. math:: A_{pr}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
:math:`\mathbf{A_{gm}}` **- Geometric mean**
|
|
83
83
|
|
|
84
84
|
.. math::
|
|
85
85
|
|
|
86
86
|
A_{gm}(x_1,...,x_n)=\sqrt[n]{\prod
|
|
87
87
|
\limits_{k=1}^{n} x_k}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
:math:`\mathbf{A_{hm}}` **- Harmonic mean**
|
|
90
90
|
|
|
91
91
|
.. math::
|
|
92
92
|
|
|
@@ -97,7 +97,7 @@ The floowoing aggregation functions are implemented in this library:
|
|
|
97
97
|
\frac{n}{\sum\limits_{k=1}^{n} \frac{1}{x_k}}, & \text{otherwise}
|
|
98
98
|
\end{cases}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
:math:`\mathbf{A_{pw}^{(r)}}` **- Power mean**
|
|
101
101
|
|
|
102
102
|
.. math::
|
|
103
103
|
|
|
@@ -115,7 +115,7 @@ where r=-1; - Geometric Mean obtained as the limit
|
|
|
115
115
|
|
|
116
116
|
--------------
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
:math:`\mathbf{A_{ex}^{(r)}}` **- Exponential mean**
|
|
119
119
|
|
|
120
120
|
.. math::
|
|
121
121
|
|
|
@@ -123,18 +123,18 @@ where r=-1; - Geometric Mean obtained as the limit
|
|
|
123
123
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
124
124
|
} r \in \mathbb{R}$, $r \neq 0
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
:math:`\mathbf{A_{lm}}` **- Lehmer mean**
|
|
127
127
|
|
|
128
|
-
.. math::
|
|
128
|
+
.. math:: A_{lm}(x_1,...,x_n)= \frac{\sum \limits_{k=1}^{n}x_k^r}{\sum \limits_{k=1}^{n}x_k^{r-1}}
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
:math:`\mathbf{A_{amn}^{(p)}}` **- Arithmetic minimum mean**
|
|
131
131
|
|
|
132
132
|
.. math::
|
|
133
133
|
|
|
134
134
|
A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
135
135
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
:math:`\mathbf{A_{amx}^{(p)}}` **- Arithmetic maximum mean**
|
|
138
138
|
|
|
139
139
|
.. math::
|
|
140
140
|
|
|
@@ -148,7 +148,7 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
148
148
|
calculation of the median and the Olympic aggregation are reduced to the
|
|
149
149
|
case of calculating the arithmetic mean of the given values.
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
:math:`\mathbf{A_{md}}` **- Median - ordered weighted aggregation**
|
|
152
152
|
|
|
153
153
|
.. math::
|
|
154
154
|
|
|
@@ -158,15 +158,15 @@ case of calculating the arithmetic mean of the given values.
|
|
|
158
158
|
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
159
159
|
\end{cases},
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
:math:`\mathbf{A_{ol}}` **- Olimpic aggregation**
|
|
162
162
|
|
|
163
163
|
.. math:: A_{ol}(x_1,\dots,x_n) = \frac{1}{n-2} \sum \limits_{k=2}^{n-1} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
164
164
|
|
|
165
|
-
:math:`\mathbf{A_{oln}^{p}}` **- Olimpic aggregation**
|
|
165
|
+
:math:`\mathbf{A_{oln}^{(p)}}` **- Olimpic aggregation**
|
|
166
166
|
|
|
167
167
|
We can specify how many greatest and smallest records remove
|
|
168
168
|
|
|
169
|
-
.. math:: A_{oln}^{p}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
169
|
+
.. math:: A_{oln}^{(p)}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
170
170
|
|
|
171
171
|
--------------
|
|
172
172
|
|
|
@@ -179,11 +179,11 @@ https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_
|
|
|
179
179
|
|
|
180
180
|
A_{ln}\left(x_1, x_2, \ldots, x_n\right)=(n-1) ! \sum_{i=1}^n \frac{x_i}{\prod_{\substack{j=1 \\ j \neq i}}^n \log \left(x_i / x_j\right)}
|
|
181
181
|
|
|
182
|
-
:math:`A^
|
|
183
|
-
|
|
182
|
+
:math:`A^{(p)}_{A_1,A_2}` - Convex combinations of aggregation functions
|
|
183
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
184
184
|
|
|
185
185
|
We can construct covex combination of aggregation functions as
|
|
186
|
-
:math:`A^
|
|
186
|
+
:math:`A^{(p)}_{A_1,A_2}=pA_1+(1-p)A_2`, where :math:`A_1, A_2` are
|
|
187
187
|
aggregation functions and :math:`p \in [0,1]`.
|
|
188
188
|
|
|
189
189
|
References
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: aggregationslib
|
|
3
|
-
Version: 0.1.5.
|
|
3
|
+
Version: 0.1.5.dev2
|
|
4
4
|
Summary: Python implementation of Arithmetic, quasi arithmetic and other aggregating functions
|
|
5
5
|
Author: wgalka
|
|
6
6
|
Project-URL: Homepage, https://github.com/wgalka/Means
|
|
7
7
|
Project-URL: Download, https://github.com/wgalka/Means/releases/latest
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/x-rst
|
|
@@ -81,29 +81,29 @@ fulfills two boundary conditions, namely :math:`A(0,\dots,0) = 0`,
|
|
|
81
81
|
|
|
82
82
|
The floowoing aggregation functions are implemented in this library:
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
:math:`\mathbf{A_{ar}}` **- Arithmetic mean**
|
|
85
85
|
|
|
86
86
|
.. math:: A_{ar}(x_1,...,x_n)=\frac{1}{n}\sum \limits_{k=1}^{n} x_k
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
:math:`\mathbf{A_{qd}}` **- Quadratic mean**
|
|
89
89
|
|
|
90
90
|
.. math::
|
|
91
91
|
|
|
92
92
|
A_{qd}(x_1,...,x_n)=\sqrt{\frac{1}{n}\sum
|
|
93
93
|
\limits_{k=1}^{n} x_k^2}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
:math:`\mathbf{A_{pr}}` **- Product aggregation**
|
|
96
96
|
|
|
97
|
-
.. math:: A_{
|
|
97
|
+
.. math:: A_{pr}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
:math:`\mathbf{A_{gm}}` **- Geometric mean**
|
|
100
100
|
|
|
101
101
|
.. math::
|
|
102
102
|
|
|
103
103
|
A_{gm}(x_1,...,x_n)=\sqrt[n]{\prod
|
|
104
104
|
\limits_{k=1}^{n} x_k}
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
:math:`\mathbf{A_{hm}}` **- Harmonic mean**
|
|
107
107
|
|
|
108
108
|
.. math::
|
|
109
109
|
|
|
@@ -114,7 +114,7 @@ The floowoing aggregation functions are implemented in this library:
|
|
|
114
114
|
\frac{n}{\sum\limits_{k=1}^{n} \frac{1}{x_k}}, & \text{otherwise}
|
|
115
115
|
\end{cases}
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
:math:`\mathbf{A_{pw}^{(r)}}` **- Power mean**
|
|
118
118
|
|
|
119
119
|
.. math::
|
|
120
120
|
|
|
@@ -132,7 +132,7 @@ where r=-1; - Geometric Mean obtained as the limit
|
|
|
132
132
|
|
|
133
133
|
--------------
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
:math:`\mathbf{A_{ex}^{(r)}}` **- Exponential mean**
|
|
136
136
|
|
|
137
137
|
.. math::
|
|
138
138
|
|
|
@@ -140,18 +140,18 @@ where r=-1; - Geometric Mean obtained as the limit
|
|
|
140
140
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
141
141
|
} r \in \mathbb{R}$, $r \neq 0
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
:math:`\mathbf{A_{lm}}` **- Lehmer mean**
|
|
144
144
|
|
|
145
|
-
.. math::
|
|
145
|
+
.. math:: A_{lm}(x_1,...,x_n)= \frac{\sum \limits_{k=1}^{n}x_k^r}{\sum \limits_{k=1}^{n}x_k^{r-1}}
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
:math:`\mathbf{A_{amn}^{(p)}}` **- Arithmetic minimum mean**
|
|
148
148
|
|
|
149
149
|
.. math::
|
|
150
150
|
|
|
151
151
|
A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
152
152
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
:math:`\mathbf{A_{amx}^{(p)}}` **- Arithmetic maximum mean**
|
|
155
155
|
|
|
156
156
|
.. math::
|
|
157
157
|
|
|
@@ -165,7 +165,7 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
165
165
|
calculation of the median and the Olympic aggregation are reduced to the
|
|
166
166
|
case of calculating the arithmetic mean of the given values.
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
:math:`\mathbf{A_{md}}` **- Median - ordered weighted aggregation**
|
|
169
169
|
|
|
170
170
|
.. math::
|
|
171
171
|
|
|
@@ -175,15 +175,15 @@ case of calculating the arithmetic mean of the given values.
|
|
|
175
175
|
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
176
176
|
\end{cases},
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
:math:`\mathbf{A_{ol}}` **- Olimpic aggregation**
|
|
179
179
|
|
|
180
180
|
.. math:: A_{ol}(x_1,\dots,x_n) = \frac{1}{n-2} \sum \limits_{k=2}^{n-1} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
181
181
|
|
|
182
|
-
:math:`\mathbf{A_{oln}^{p}}` **- Olimpic aggregation**
|
|
182
|
+
:math:`\mathbf{A_{oln}^{(p)}}` **- Olimpic aggregation**
|
|
183
183
|
|
|
184
184
|
We can specify how many greatest and smallest records remove
|
|
185
185
|
|
|
186
|
-
.. math:: A_{oln}^{p}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
186
|
+
.. math:: A_{oln}^{(p)}(x_1,\dots,x_n) = \frac{1}{n-2p} \sum \limits_{k=p}^{n-p} y_k, \quad \text{where } \{y_1, \dots, y_n\} = \{x_1, \dots, x_n\},\ y_1 \leq y_2 \leq \dots \leq y_n.
|
|
187
187
|
|
|
188
188
|
--------------
|
|
189
189
|
|
|
@@ -196,11 +196,11 @@ https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_
|
|
|
196
196
|
|
|
197
197
|
A_{ln}\left(x_1, x_2, \ldots, x_n\right)=(n-1) ! \sum_{i=1}^n \frac{x_i}{\prod_{\substack{j=1 \\ j \neq i}}^n \log \left(x_i / x_j\right)}
|
|
198
198
|
|
|
199
|
-
:math:`A^
|
|
200
|
-
|
|
199
|
+
:math:`A^{(p)}_{A_1,A_2}` - Convex combinations of aggregation functions
|
|
200
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
201
201
|
|
|
202
202
|
We can construct covex combination of aggregation functions as
|
|
203
|
-
:math:`A^
|
|
203
|
+
:math:`A^{(p)}_{A_1,A_2}=pA_1+(1-p)A_2`, where :math:`A_1, A_2` are
|
|
204
204
|
aggregation functions and :math:`p \in [0,1]`.
|
|
205
205
|
|
|
206
206
|
References
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/.github/workflows/python-publish.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/conjuctive/__init__.py
RENAMED
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/conjuctive/purepython.py
RENAMED
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/decimalaggregations.py
RENAMED
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib/disjunctive/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/requires.txt
RENAMED
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/aggregationslib.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.5.dev1 → aggregationslib-0.1.5.dev2}/tests/test_decimal_exponential_mean.py
RENAMED
|
File without changes
|