aggregationslib 0.1.0.dev1__tar.gz → 0.1.3__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.0.dev1/aggregationslib.egg-info → aggregationslib-0.1.3}/PKG-INFO +33 -30
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/README.md +31 -23
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3/aggregationslib.egg-info}/PKG-INFO +33 -30
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib.egg-info/SOURCES.txt +1 -1
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/pyproject.toml +2 -2
- aggregationslib-0.1.3/tests/__init__.py +0 -0
- aggregationslib-0.1.0.dev1/setup.py +0 -38
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/.github/workflows/python-publish.yml +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/.gitignore +0 -0
- /aggregationslib-0.1.0.dev1/aggregationslib/__init__.py → /aggregationslib-0.1.3/LICENSE +0 -0
- {aggregationslib-0.1.0.dev1/aggregationslib/conjuctive → aggregationslib-0.1.3/aggregationslib}/__init__.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/aggregation.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/aggregations.py +0 -0
- {aggregationslib-0.1.0.dev1/aggregationslib/disjunctive → aggregationslib-0.1.3/aggregationslib/conjuctive}/__init__.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/conjuctive/purepython.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/decimalaggregations.py +0 -0
- {aggregationslib-0.1.0.dev1/tests → aggregationslib-0.1.3/aggregationslib/disjunctive}/__init__.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/example.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/purepython.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib.egg-info/dependency_links.txt +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib.egg-info/requires.txt +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib.egg-info/top_level.txt +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/setup.cfg +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/tests/test_aggregations.py +0 -0
- {aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/tests/test_decimal_exponential_mean.py +0 -0
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: aggregationslib
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Python implementation of Arithmetic, quasi arithmetic and other aggregating functions
|
|
5
|
-
Home-page: https://github.com/wgalka/Means
|
|
6
|
-
Download-URL: https://github.com/wgalka/Means/archive/refs/tags/v0.0.3.tar.gz
|
|
7
5
|
Author: wgalka
|
|
8
|
-
License: MIT
|
|
9
6
|
Project-URL: Homepage, https://github.com/wgalka/Means
|
|
10
7
|
Project-URL: Download, https://github.com/wgalka/Means/releases/latest
|
|
11
8
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
9
|
Classifier: Operating System :: OS Independent
|
|
13
10
|
Requires-Python: >=3.12
|
|
14
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
15
13
|
Requires-Dist: numpy>=2.2.2
|
|
16
14
|
Requires-Dist: pynverse
|
|
17
15
|
Provides-Extra: test
|
|
18
16
|
Requires-Dist: pytest>=8.3.4; extra == "test"
|
|
19
|
-
Dynamic: download-url
|
|
20
|
-
Dynamic: home-page
|
|
21
|
-
Dynamic: requires-python
|
|
22
17
|
|
|
23
18
|
# Means
|
|
24
19
|
Means, Aggregation functions...
|
|
@@ -76,32 +71,38 @@ fulfills two boundary conditions, namely $A(0,\dots,0) = 0$, $A(1,\dots,1) = 1$.
|
|
|
76
71
|
|
|
77
72
|
The floowoing aggregation functions are implemented in this library:
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
**Arithmetic mean**
|
|
80
75
|
|
|
81
76
|
$$A_{ar}(x_1,...,x_n)=\frac{1}{n}\sum \limits_{k=1}^{n} x_k$$
|
|
82
77
|
|
|
83
|
-
|
|
78
|
+
**Quadratic mean**
|
|
84
79
|
|
|
85
80
|
$$A_{qd}(x_1,...,x_n)=\sqrt{\frac{1}{n}\sum
|
|
86
81
|
\limits_{k=1}^{n} x_k^2}$$
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
**Product aggregation**
|
|
89
84
|
|
|
90
85
|
$$A_{\text{pr}}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k$$
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
**Geometric mean**
|
|
93
88
|
|
|
94
89
|
$$A_{gm}(x_1,...,x_n)=\sqrt[n]{\prod
|
|
95
90
|
\limits_{k=1}^{n} x_k}$$
|
|
96
91
|
|
|
97
|
-
|
|
92
|
+
**Harmonic mean**
|
|
98
93
|
|
|
99
|
-
$$
|
|
100
|
-
|
|
101
|
-
\
|
|
102
|
-
\
|
|
94
|
+
$$
|
|
95
|
+
A_{hm}(x_1,...,x_n)=
|
|
96
|
+
\left\{
|
|
97
|
+
\begin{array}{ll}
|
|
98
|
+
0, & \exists k,\, 1 \leq k \leq n : x_k = 0 \\
|
|
99
|
+
\frac{n}{\sum\limits_{k=1}^{n} \frac{1}{x_k}}, & \text{otherwise}
|
|
100
|
+
\end{array}
|
|
101
|
+
\right.
|
|
102
|
+
$$
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
|
|
105
|
+
**Power mean**
|
|
105
106
|
|
|
106
107
|
$$A_{pw}^{(r)}(x_1,...,x_n)=\left\{ \begin{array}{ll}
|
|
107
108
|
0, & r<0, \; \exists k,\, 1 \leq k \leq n : x_k = 0 \\
|
|
@@ -117,33 +118,26 @@ special cases of power means $A_{\text{pw}}^r$ [1] are:
|
|
|
117
118
|
|
|
118
119
|
----
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
**Exponential mean**
|
|
121
122
|
|
|
122
123
|
$$A_{ex}^{(r)}(x_1,...,x_n)= \frac{1}{r}\ln
|
|
123
124
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
124
125
|
} r \in \mathbb{R}$, $r \neq 0$$
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
**Lehmer mean**
|
|
127
128
|
|
|
128
129
|
$$ 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
130
|
|
|
130
|
-
|
|
131
|
+
**Arithmetic minimum mean**
|
|
131
132
|
|
|
132
133
|
$$A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
133
134
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,$$
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
**Arithmetic maximum mean**
|
|
136
137
|
|
|
137
138
|
$$A_{amx}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
138
139
|
(1-p) \max \limits_{1\leq k \leq n}x_k,$$
|
|
139
140
|
|
|
140
|
-
**$A_{md}$ - Median - ordered weighted aggregation**
|
|
141
|
-
|
|
142
|
-
$$A_{md}(x_1,\dots,x_n) =
|
|
143
|
-
\begin{cases}
|
|
144
|
-
y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
145
|
-
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
146
|
-
\end{cases},$$
|
|
147
141
|
|
|
148
142
|
### OWA
|
|
149
143
|
|
|
@@ -151,11 +145,20 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
151
145
|
calculation of the median and the Olympic aggregation are reduced to the case of calculating the
|
|
152
146
|
arithmetic mean of the given values.
|
|
153
147
|
|
|
154
|
-
|
|
148
|
+
**Median - ordered weighted aggregation**
|
|
149
|
+
|
|
150
|
+
$$A_{md}(x_1,\dots,x_n) =
|
|
151
|
+
\begin{cases}
|
|
152
|
+
y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
153
|
+
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
154
|
+
\end{cases},$$
|
|
155
|
+
|
|
156
|
+
**Olimpic aggregation**
|
|
155
157
|
|
|
156
158
|
$$ 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.$$
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
**Olimpic aggregation**
|
|
161
|
+
|
|
159
162
|
We can specify how many greatest and smallest records remove
|
|
160
163
|
|
|
161
164
|
$$ 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.$$
|
|
@@ -54,32 +54,38 @@ 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
|
+
**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
|
+
**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
|
+
**Product aggregation**
|
|
67
67
|
|
|
68
68
|
$$A_{\text{pr}}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k$$
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
**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
|
-
|
|
75
|
+
**Harmonic mean**
|
|
76
76
|
|
|
77
|
-
$$
|
|
78
|
-
|
|
79
|
-
\
|
|
80
|
-
\
|
|
77
|
+
$$
|
|
78
|
+
A_{hm}(x_1,...,x_n)=
|
|
79
|
+
\left\{
|
|
80
|
+
\begin{array}{ll}
|
|
81
|
+
0, & \exists k,\, 1 \leq k \leq n : x_k = 0 \\
|
|
82
|
+
\frac{n}{\sum\limits_{k=1}^{n} \frac{1}{x_k}}, & \text{otherwise}
|
|
83
|
+
\end{array}
|
|
84
|
+
\right.
|
|
85
|
+
$$
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
|
|
88
|
+
**Power mean**
|
|
83
89
|
|
|
84
90
|
$$A_{pw}^{(r)}(x_1,...,x_n)=\left\{ \begin{array}{ll}
|
|
85
91
|
0, & r<0, \; \exists k,\, 1 \leq k \leq n : x_k = 0 \\
|
|
@@ -95,33 +101,26 @@ special cases of power means $A_{\text{pw}}^r$ [1] are:
|
|
|
95
101
|
|
|
96
102
|
----
|
|
97
103
|
|
|
98
|
-
|
|
104
|
+
**Exponential mean**
|
|
99
105
|
|
|
100
106
|
$$A_{ex}^{(r)}(x_1,...,x_n)= \frac{1}{r}\ln
|
|
101
107
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
102
108
|
} r \in \mathbb{R}$, $r \neq 0$$
|
|
103
109
|
|
|
104
|
-
|
|
110
|
+
**Lehmer mean**
|
|
105
111
|
|
|
106
112
|
$$ A_{lm}(x_1,...,x_n)= \frac{\sum \limits_{k=1}^{n}x_k^r}{\sum \limits_{k=1}^{n}x_k^{r-1}} $$
|
|
107
113
|
|
|
108
|
-
|
|
114
|
+
**Arithmetic minimum mean**
|
|
109
115
|
|
|
110
116
|
$$A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
111
117
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,$$
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
**Arithmetic maximum mean**
|
|
114
120
|
|
|
115
121
|
$$A_{amx}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
116
122
|
(1-p) \max \limits_{1\leq k \leq n}x_k,$$
|
|
117
123
|
|
|
118
|
-
**$A_{md}$ - Median - ordered weighted aggregation**
|
|
119
|
-
|
|
120
|
-
$$A_{md}(x_1,\dots,x_n) =
|
|
121
|
-
\begin{cases}
|
|
122
|
-
y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
123
|
-
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
124
|
-
\end{cases},$$
|
|
125
124
|
|
|
126
125
|
### OWA
|
|
127
126
|
|
|
@@ -129,11 +128,20 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
129
128
|
calculation of the median and the Olympic aggregation are reduced to the case of calculating the
|
|
130
129
|
arithmetic mean of the given values.
|
|
131
130
|
|
|
132
|
-
|
|
131
|
+
**Median - ordered weighted aggregation**
|
|
132
|
+
|
|
133
|
+
$$A_{md}(x_1,\dots,x_n) =
|
|
134
|
+
\begin{cases}
|
|
135
|
+
y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
136
|
+
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
137
|
+
\end{cases},$$
|
|
138
|
+
|
|
139
|
+
**Olimpic aggregation**
|
|
133
140
|
|
|
134
141
|
$$ 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.$$
|
|
135
142
|
|
|
136
|
-
|
|
143
|
+
**Olimpic aggregation**
|
|
144
|
+
|
|
137
145
|
We can specify how many greatest and smallest records remove
|
|
138
146
|
|
|
139
147
|
$$ 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.$$
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: aggregationslib
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Python implementation of Arithmetic, quasi arithmetic and other aggregating functions
|
|
5
|
-
Home-page: https://github.com/wgalka/Means
|
|
6
|
-
Download-URL: https://github.com/wgalka/Means/archive/refs/tags/v0.0.3.tar.gz
|
|
7
5
|
Author: wgalka
|
|
8
|
-
License: MIT
|
|
9
6
|
Project-URL: Homepage, https://github.com/wgalka/Means
|
|
10
7
|
Project-URL: Download, https://github.com/wgalka/Means/releases/latest
|
|
11
8
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
9
|
Classifier: Operating System :: OS Independent
|
|
13
10
|
Requires-Python: >=3.12
|
|
14
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
15
13
|
Requires-Dist: numpy>=2.2.2
|
|
16
14
|
Requires-Dist: pynverse
|
|
17
15
|
Provides-Extra: test
|
|
18
16
|
Requires-Dist: pytest>=8.3.4; extra == "test"
|
|
19
|
-
Dynamic: download-url
|
|
20
|
-
Dynamic: home-page
|
|
21
|
-
Dynamic: requires-python
|
|
22
17
|
|
|
23
18
|
# Means
|
|
24
19
|
Means, Aggregation functions...
|
|
@@ -76,32 +71,38 @@ fulfills two boundary conditions, namely $A(0,\dots,0) = 0$, $A(1,\dots,1) = 1$.
|
|
|
76
71
|
|
|
77
72
|
The floowoing aggregation functions are implemented in this library:
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
**Arithmetic mean**
|
|
80
75
|
|
|
81
76
|
$$A_{ar}(x_1,...,x_n)=\frac{1}{n}\sum \limits_{k=1}^{n} x_k$$
|
|
82
77
|
|
|
83
|
-
|
|
78
|
+
**Quadratic mean**
|
|
84
79
|
|
|
85
80
|
$$A_{qd}(x_1,...,x_n)=\sqrt{\frac{1}{n}\sum
|
|
86
81
|
\limits_{k=1}^{n} x_k^2}$$
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
**Product aggregation**
|
|
89
84
|
|
|
90
85
|
$$A_{\text{pr}}(x_1, x_2, \dots, x_n) = \prod_{k=1}^n x_k$$
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
**Geometric mean**
|
|
93
88
|
|
|
94
89
|
$$A_{gm}(x_1,...,x_n)=\sqrt[n]{\prod
|
|
95
90
|
\limits_{k=1}^{n} x_k}$$
|
|
96
91
|
|
|
97
|
-
|
|
92
|
+
**Harmonic mean**
|
|
98
93
|
|
|
99
|
-
$$
|
|
100
|
-
|
|
101
|
-
\
|
|
102
|
-
\
|
|
94
|
+
$$
|
|
95
|
+
A_{hm}(x_1,...,x_n)=
|
|
96
|
+
\left\{
|
|
97
|
+
\begin{array}{ll}
|
|
98
|
+
0, & \exists k,\, 1 \leq k \leq n : x_k = 0 \\
|
|
99
|
+
\frac{n}{\sum\limits_{k=1}^{n} \frac{1}{x_k}}, & \text{otherwise}
|
|
100
|
+
\end{array}
|
|
101
|
+
\right.
|
|
102
|
+
$$
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
|
|
105
|
+
**Power mean**
|
|
105
106
|
|
|
106
107
|
$$A_{pw}^{(r)}(x_1,...,x_n)=\left\{ \begin{array}{ll}
|
|
107
108
|
0, & r<0, \; \exists k,\, 1 \leq k \leq n : x_k = 0 \\
|
|
@@ -117,33 +118,26 @@ special cases of power means $A_{\text{pw}}^r$ [1] are:
|
|
|
117
118
|
|
|
118
119
|
----
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
**Exponential mean**
|
|
121
122
|
|
|
122
123
|
$$A_{ex}^{(r)}(x_1,...,x_n)= \frac{1}{r}\ln
|
|
123
124
|
\Big(\frac{1}{n} \sum \limits_{k=1}^{n} e^{rx_k}\Big), \text{where
|
|
124
125
|
} r \in \mathbb{R}$, $r \neq 0$$
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
**Lehmer mean**
|
|
127
128
|
|
|
128
129
|
$$ 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
130
|
|
|
130
|
-
|
|
131
|
+
**Arithmetic minimum mean**
|
|
131
132
|
|
|
132
133
|
$$A_{amn}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
133
134
|
(1-p) \min \limits_{1 \leq k \leq n}x_k,$$
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
**Arithmetic maximum mean**
|
|
136
137
|
|
|
137
138
|
$$A_{amx}^{(p)}(x_1,...,x_n)=\frac{p}{n}\sum \limits_{k=1}^{n} x_k+
|
|
138
139
|
(1-p) \max \limits_{1\leq k \leq n}x_k,$$
|
|
139
140
|
|
|
140
|
-
**$A_{md}$ - Median - ordered weighted aggregation**
|
|
141
|
-
|
|
142
|
-
$$A_{md}(x_1,\dots,x_n) =
|
|
143
|
-
\begin{cases}
|
|
144
|
-
y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
145
|
-
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
146
|
-
\end{cases},$$
|
|
147
141
|
|
|
148
142
|
### OWA
|
|
149
143
|
|
|
@@ -151,11 +145,20 @@ In the case of n = 2 (when only two values are aggregated) the
|
|
|
151
145
|
calculation of the median and the Olympic aggregation are reduced to the case of calculating the
|
|
152
146
|
arithmetic mean of the given values.
|
|
153
147
|
|
|
154
|
-
|
|
148
|
+
**Median - ordered weighted aggregation**
|
|
149
|
+
|
|
150
|
+
$$A_{md}(x_1,\dots,x_n) =
|
|
151
|
+
\begin{cases}
|
|
152
|
+
y_{(n+1)/2},&\text{if $n$ is odd}\\
|
|
153
|
+
\frac{y_{n/2}+y_{(n/2)+1}}{2},&\text{if $n$ is even}
|
|
154
|
+
\end{cases},$$
|
|
155
|
+
|
|
156
|
+
**Olimpic aggregation**
|
|
155
157
|
|
|
156
158
|
$$ 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.$$
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
**Olimpic aggregation**
|
|
161
|
+
|
|
159
162
|
We can specify how many greatest and smallest records remove
|
|
160
163
|
|
|
161
164
|
$$ 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.$$
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
requires = ["setuptools>=61", "setuptools-scm", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
text = "MIT"
|
|
5
|
+
|
|
7
6
|
|
|
8
7
|
[project]
|
|
9
8
|
name = "aggregationslib"
|
|
10
9
|
description = "Python implementation of Arithmetic, quasi arithmetic and other aggregating functions"
|
|
11
10
|
readme = "README.md"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
12
|
requires-python = ">=3.12"
|
|
13
13
|
authors = [
|
|
14
14
|
{ name = "wgalka" }
|
|
File without changes
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
from setuptools import find_packages, setup
|
|
4
|
-
|
|
5
|
-
version = '0.0.3'
|
|
6
|
-
|
|
7
|
-
this_directory = Path(__file__).parent
|
|
8
|
-
long_description = (this_directory / "README.md").read_text()
|
|
9
|
-
|
|
10
|
-
setup(
|
|
11
|
-
classifiers=[
|
|
12
|
-
'Programming Language :: Python :: 3.13',
|
|
13
|
-
'License :: OSI Approved :: MIT License',
|
|
14
|
-
'Operating System :: OS Independent',
|
|
15
|
-
],
|
|
16
|
-
name='aggregationslib',
|
|
17
|
-
packages=find_packages(include=['aggregationslib', 'aggregationslib.*']),
|
|
18
|
-
# version=version,
|
|
19
|
-
use_scm_version=True,
|
|
20
|
-
description='Python implementation of Arithmetic, quasi arithmetic and other aggregating functions',
|
|
21
|
-
long_description=long_description,
|
|
22
|
-
long_description_content_type='text/markdown',
|
|
23
|
-
python_requires='>=3.12',
|
|
24
|
-
author='wgalka',
|
|
25
|
-
license='TO DOO',
|
|
26
|
-
|
|
27
|
-
url='https://github.com/wgalka/Means',
|
|
28
|
-
download_url=f'https://github.com/wgalka/Means/archive/refs/tags/v{version}.tar.gz',
|
|
29
|
-
|
|
30
|
-
install_requires=["numpy>=2.2.2",
|
|
31
|
-
"pynverse"],
|
|
32
|
-
setup_requires=['pytest-runner>=6.0.1'],
|
|
33
|
-
tests_require=['pytest==8.3.4'],
|
|
34
|
-
extras_require={
|
|
35
|
-
'test': ['pytest>=8.3.4'],
|
|
36
|
-
},
|
|
37
|
-
test_suite='tests',
|
|
38
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib/conjuctive/purepython.py
RENAMED
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.0.dev1/tests → aggregationslib-0.1.3/aggregationslib/disjunctive}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aggregationslib-0.1.0.dev1 → aggregationslib-0.1.3}/aggregationslib.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|