aggregationslib 0.2.5__tar.gz → 0.2.7__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.2.5/aggregationslib.egg-info → aggregationslib-0.2.7}/PKG-INFO +26 -15
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/README.md +71 -15
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/README.rst +20 -14
- aggregationslib-0.2.7/aggregation_classification.html +919 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/aggregation.py +35 -13
- aggregationslib-0.2.7/aggregationslib/cli.py +81 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/decimalaggregations.py +38 -18
- aggregationslib-0.2.7/aggregationslib/ndarray.py +200 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7/aggregationslib.egg-info}/PKG-INFO +26 -15
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib.egg-info/SOURCES.txt +21 -1
- aggregationslib-0.2.7/aggregationslib.egg-info/entry_points.txt +2 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib.egg-info/requires.txt +6 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib.egg-info/scm_file_list.json +20 -1
- aggregationslib-0.2.7/aggregationslib.egg-info/scm_version.json +8 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib.egg-info/top_level.txt +1 -0
- aggregationslib-0.2.7/apps/shiny/README.md +118 -0
- aggregationslib-0.2.7/apps/shiny/app.py +513 -0
- aggregationslib-0.2.7/apps/shiny/column-selection.js +128 -0
- aggregationslib-0.2.7/apps/shiny/core.py +170 -0
- aggregationslib-0.2.7/apps/shiny/evaluation.py +98 -0
- aggregationslib-0.2.7/apps/shiny/example.csv +21 -0
- aggregationslib-0.2.7/diagram-aggregation-classification.svg +385 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/diagram-klasyfikacja-agregacji.svg +22 -22
- aggregationslib-0.2.7/docs/aggregation_classification.html +919 -0
- aggregationslib-0.2.7/docs/assets/diagram-aggregation-classification.svg +385 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/diagram-klasyfikacja-agregacji.svg +22 -22
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/klasyfikacja_agregacji.html +17 -14
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/klasyfikacja_agregacji.html +17 -14
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/pyproject.toml +8 -1
- aggregationslib-0.2.7/tests/data/README.md +54 -0
- aggregationslib-0.2.7/tests/data/wolfram_measure_reference.json +1983 -0
- aggregationslib-0.2.7/tests/test_exponential_cardinality.py +53 -0
- aggregationslib-0.2.7/tests/test_ndarray.py +243 -0
- aggregationslib-0.2.7/tests/test_shiny_app.py +101 -0
- aggregationslib-0.2.7/tests/test_shiny_evaluation.py +63 -0
- aggregationslib-0.2.7/tests/test_wolfram_measures.py +111 -0
- aggregationslib-0.2.5/aggregationslib.egg-info/scm_version.json +0 -8
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/.gitignore +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/LICENSE +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/README.pl.md +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/aggregations.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/conjuctive/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/conjuctive/purepython.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/disjunctive/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/example.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/feature_selection/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/feature_selection/binary_fuzzy_entropy.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/feature_selection/fuzzy_com_entropy.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/models/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/models/ensemble/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/models/ensemble/aggregation_regressor.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/models/single/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib/purepython.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/aggregationslib.egg-info/dependency_links.txt +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/assets/icons/icon.ico +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/assets/icons/icon.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/assets/icons/icon.svg +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/build_docs.ps1 +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/commands.md +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/diagram-implikacja-agregacja.svg +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/diagram-odwzorowanie.svg +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/.nojekyll +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/aggregation-classes.md +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/aggregation-plots.md +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregation-surfaces-all.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregation-surfaces.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_amn_p=0.5.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_amx_p=0.5.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_ar.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_ex2_p=2,q=2.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_ex3_p=2,q=1.5.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_ex_r=1.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_gm.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_hm.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_lm_r=2.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_lo.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_md.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_mn.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_mx.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_ol.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_oln_p=1.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_pr.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_pw_r=2.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/aggregations/A_qd.png +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/assets/site.css +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/en/index.html +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/fuzzy-integrals.md +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/index.html +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/docs/pl/index.html +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/generate_aggregation_plots.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/setup.cfg +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/tests/__init__.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/tests/data/wolfram_integral_reference.json +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/tests/test_aggregations.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/tests/test_decimal_exponential_mean.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/tests/test_decimal_fuzzy_integrals.py +0 -0
- {aggregationslib-0.2.5 → aggregationslib-0.2.7}/tests/test_fuzzy_integrals.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aggregationslib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
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
|
|
@@ -12,12 +12,17 @@ Requires-Python: >=3.14
|
|
|
12
12
|
Description-Content-Type: text/x-rst
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
Requires-Dist: numpy>=2.2.2
|
|
15
|
+
Requires-Dist: packaging
|
|
15
16
|
Requires-Dist: pynverse
|
|
16
17
|
Requires-Dist: scikit-learn
|
|
17
18
|
Requires-Dist: pandas
|
|
18
19
|
Requires-Dist: scipy
|
|
19
20
|
Provides-Extra: test
|
|
20
21
|
Requires-Dist: pytest>=8.3.4; extra == "test"
|
|
22
|
+
Provides-Extra: app
|
|
23
|
+
Requires-Dist: shiny<2,>=1.9; extra == "app"
|
|
24
|
+
Requires-Dist: pygments<3,>=2.19; extra == "app"
|
|
25
|
+
Requires-Dist: matplotlib<4,>=3.9; extra == "app"
|
|
21
26
|
Dynamic: license-file
|
|
22
27
|
|
|
23
28
|
Means
|
|
@@ -30,20 +35,23 @@ Documentation:
|
|
|
30
35
|
- English: https://wgalka.github.io/Means/en/
|
|
31
36
|
- Polski: https://wgalka.github.io/Means/pl/
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
Aggregation functions can be classified in several ways. A familiar distinction
|
|
39
|
+
is between three types of behaviour:
|
|
34
40
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
largest value among the inputs.
|
|
41
|
+
- Conjunctive — an AND-like combination of the inputs.
|
|
42
|
+
- Averaging — a result between the smallest and largest input values.
|
|
43
|
+
- Disjunctive — an OR-like combination of the inputs.
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
These are not the only possibilities: aggregation functions can also exhibit
|
|
46
|
+
mixed behaviour. The diagram below presents a broader classification.
|
|
47
|
+
|
|
48
|
+
.. image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
|
|
41
49
|
:alt: Classification of aggregation functions
|
|
42
|
-
:target: https://wgalka.github.io/Means/
|
|
50
|
+
:target: https://wgalka.github.io/Means/aggregation_classification.html
|
|
43
51
|
|
|
44
52
|
*Diagram elaborated on the basis of: A. Pradera, G. Beliakov, H. Bustince, B. De Baets, "A review of the relationships between implication, negation and aggregation functions from the point of view of material implication", Information Sciences 329 (2016) 357–380,* `DOI: 10.1016/j.ins.2015.09.033 <https://doi.org/10.1016/j.ins.2015.09.033>`__.
|
|
45
53
|
|
|
46
|
-
An interactive version of this diagram is available at: https://wgalka.github.io/Means/
|
|
54
|
+
An interactive version of this diagram is available at: https://wgalka.github.io/Means/aggregation_classification.html
|
|
47
55
|
|
|
48
56
|
Example 1:
|
|
49
57
|
^^^^^^^^^^
|
|
@@ -106,7 +114,7 @@ intervals. ``[0,1]`` means only the unit interval. These are
|
|
|
106
114
|
mathematical properties; most callable objects do not validate input
|
|
107
115
|
bounds at runtime. Some tags depend on parameters or the fuzzy measure.
|
|
108
116
|
|
|
109
|
-
:math:`\mathbf{A_{ch}^{(\mu)}}` **- Choquet integral [1]**
|
|
117
|
+
:math:`\mathbf{A_{ch}^{(\mu)}}` **- Discrete Choquet integral [1]**
|
|
110
118
|
|
|
111
119
|
Tags: ``averaging`` ``aggregation interval: [0,1]``
|
|
112
120
|
``symmetric if μ is symmetric``
|
|
@@ -142,8 +150,10 @@ Each constructor returns a monotone fuzzy measure with
|
|
|
142
150
|
:math:`\mu(A)=\sum_{j=1}^{|A|}w_j`. The normalized weights are applied
|
|
143
151
|
by descending value rank, so the first belongs to the largest value;
|
|
144
152
|
with the Choquet integral this capacity gives the OWA aggregation.
|
|
145
|
-
- **Exponential cardinality
|
|
146
|
-
|
|
153
|
+
- **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
|
|
154
|
+
:math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
|
|
155
|
+
For :math:`q=1`, this is the uniform/cardinality measure, and the discrete
|
|
156
|
+
Choquet integral equals the arithmetic mean.
|
|
147
157
|
|
|
148
158
|
The constructors are in ``aggregationslib.aggregation``; Decimal
|
|
149
159
|
equivalents are available in ``aggregationslib.decimalaggregations``.
|
|
@@ -157,7 +167,7 @@ two-argument function ``O(x, mu)`` as ``quasi_overlap`` to
|
|
|
157
167
|
``choquet_integral`` or ``A_ch``. The default remains the classical
|
|
158
168
|
product-based Choquet integral.
|
|
159
169
|
|
|
160
|
-
:math:`\mathbf{A_{sg}^{(\mu)}}` **- Sugeno integral [1]**
|
|
170
|
+
:math:`\mathbf{A_{sg}^{(\mu)}}` **- Discrete Sugeno integral [1]**
|
|
161
171
|
|
|
162
172
|
Tags: ``averaging`` ``aggregation interval: [0,1]``
|
|
163
173
|
``symmetric if μ is symmetric``
|
|
@@ -196,8 +206,9 @@ available in ``aggregationslib.aggregation`` and
|
|
|
196
206
|
by descending value rank, so the first belongs to the largest value.
|
|
197
207
|
In the Sugeno integral this capacity is used in the max–min formula;
|
|
198
208
|
the result is not the OWA aggregation.
|
|
199
|
-
- **Exponential cardinality
|
|
200
|
-
|
|
209
|
+
- **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
|
|
210
|
+
:math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
|
|
211
|
+
For :math:`q=1`, this is the uniform/cardinality measure.
|
|
201
212
|
|
|
202
213
|
:math:`\mathbf{A_{ar}}` **- Arithmetic mean**
|
|
203
214
|
|
|
@@ -6,15 +6,21 @@ Documentation:
|
|
|
6
6
|
- English: https://wgalka.github.io/Means/en/
|
|
7
7
|
- Polski: https://wgalka.github.io/Means/pl/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
Aggregation functions can be classified in several ways. A familiar distinction
|
|
10
|
+
is between three types of behaviour:
|
|
11
|
+
|
|
12
|
+
- Conjunctive — an AND-like combination of the inputs.
|
|
13
|
+
- Averaging — a result between the smallest and largest input values.
|
|
14
|
+
- Disjunctive — an OR-like combination of the inputs.
|
|
15
|
+
|
|
16
|
+
These are not the only possibilities: aggregation functions can also exhibit
|
|
17
|
+
mixed behaviour. The diagram below presents a broader classification.
|
|
18
|
+
|
|
19
|
+
[](https://wgalka.github.io/Means/aggregation_classification.html)
|
|
20
|
+
|
|
21
|
+
*Diagram elaborated on the basis of: A. Pradera, G. Beliakov, H. Bustince, B. De Baets, "A review of the relationships between implication, negation and aggregation functions from the point of view of material implication", Information Sciences 329 (2016) 357–380, [DOI: 10.1016/j.ins.2015.09.033](https://doi.org/10.1016/j.ins.2015.09.033).*
|
|
22
|
+
|
|
23
|
+
An interactive version of this diagram is available at: https://wgalka.github.io/Means/aggregation_classification.html
|
|
18
24
|
|
|
19
25
|
#### Example 1:
|
|
20
26
|
|
|
@@ -51,6 +57,47 @@ print(func3.__repr__()) # function parameters are printed in order: func1, func2
|
|
|
51
57
|
|
|
52
58
|
|
|
53
59
|
|
|
60
|
+
## Multidimensional arrays
|
|
61
|
+
|
|
62
|
+
`aggregationslib.ndarray` provides the same `A_...` objects as
|
|
63
|
+
`aggregationslib.aggregations`, with additional constructor options `axis`
|
|
64
|
+
and `keepdims`. It applies the existing vector implementation separately
|
|
65
|
+
to each vector along the selected axis.
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
import numpy as np
|
|
69
|
+
from aggregationslib.ndarray import A_ar, A_ch
|
|
70
|
+
from aggregationslib import weighted_measure
|
|
71
|
+
|
|
72
|
+
X = np.array([[0.2, 0.6, 0.9], [0.9, 0.2, 0.6]])
|
|
73
|
+
A_ar(axis=1)(X) # shape (2,): one value per row
|
|
74
|
+
A_ar(axis=0)(X) # shape (3,): one value per column
|
|
75
|
+
A_ar(axis=1, keepdims=True)(X) # shape (2, 1)
|
|
76
|
+
A_ar()(X) # scalar: aggregate all elements
|
|
77
|
+
|
|
78
|
+
mu = weighted_measure([0.5, 0.3, 0.2])
|
|
79
|
+
A_ch(measure=mu, axis=-1)(X) # array([0.46, 0.63])
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`axis=None` (the default) flattens the input in C order. An integer axis,
|
|
83
|
+
including a negative index, reduces that axis; tuples of axes are not
|
|
84
|
+
supported. For an input of shape `(m, n)`, `axis=1` returns shape `(m,)`,
|
|
85
|
+
including `(1,)` when there is just one row. `keepdims=True` retains reduced
|
|
86
|
+
dimensions with length one. A complete reduction returns a scalar unless
|
|
87
|
+
`keepdims=True`.
|
|
88
|
+
|
|
89
|
+
Choquet and Sugeno use the same measure for each vector. Its size must match
|
|
90
|
+
the selected axis length, or the total element count for `axis=None`.
|
|
91
|
+
Choquet's `quasi_overlap` continues to accept scalar callbacks.
|
|
92
|
+
`Combine2Aggregations` accepts vector callables or objects from this module;
|
|
93
|
+
the combination's own `axis` and `keepdims` control the reduction.
|
|
94
|
+
|
|
95
|
+
Empty vectors are rejected. An empty batch of nonempty vectors returns an
|
|
96
|
+
empty floating-point array of the appropriate shape. The mathematical
|
|
97
|
+
domains, parameter rules and numerical behavior are inherited from the
|
|
98
|
+
vector implementations. This module uses iteration over vectors, not
|
|
99
|
+
vectorized implementations of the aggregation formulas.
|
|
100
|
+
|
|
54
101
|
## Aggregation functions
|
|
55
102
|
|
|
56
103
|
An aggregation function on the unit interval [1] is an increasing mapping
|
|
@@ -71,7 +118,7 @@ intervals. `[0,1]` means only the unit interval. These are mathematical
|
|
|
71
118
|
properties; most callable objects do not validate input bounds at runtime.
|
|
72
119
|
Some tags depend on parameters or the fuzzy measure.
|
|
73
120
|
|
|
74
|
-
$\mathbf{A_{ch}^{(\mu)}}$ **- Choquet integral [1]**
|
|
121
|
+
$\mathbf{A_{ch}^{(\mu)}}$ **- Discrete Choquet integral [1]**
|
|
75
122
|
|
|
76
123
|
Tags: `averaging` `aggregation interval: [0,1]` `symmetric if μ is symmetric`
|
|
77
124
|
|
|
@@ -102,8 +149,10 @@ $\mu(\emptyset)=0$ and $\mu(N)=1$.
|
|
|
102
149
|
$\mu(A)=\sum_{j=1}^{|A|}w_j$. The normalized weights are applied by
|
|
103
150
|
descending value rank, so the first belongs to the largest value; with the
|
|
104
151
|
Choquet integral this capacity gives the OWA aggregation.
|
|
105
|
-
- **Exponential cardinality
|
|
106
|
-
|
|
152
|
+
- **Exponential cardinality** (`exponential_cardinality_measure(n, q=1)`):
|
|
153
|
+
$\mu(A)=(|A|/n)^q$, where `q` must be finite and $q>0$.
|
|
154
|
+
For $q=1$, this is the uniform/cardinality measure, and the discrete
|
|
155
|
+
Choquet integral equals the arithmetic mean.
|
|
107
156
|
|
|
108
157
|
The constructors are in `aggregationslib.aggregation`; Decimal equivalents
|
|
109
158
|
are available in `aggregationslib.decimalaggregations`.
|
|
@@ -115,7 +164,7 @@ For the quasi-overlap generalization from Equation (9), pass a two-argument
|
|
|
115
164
|
function `O(x, mu)` as `quasi_overlap` to `choquet_integral` or `A_ch`. The
|
|
116
165
|
default remains the classical product-based Choquet integral.
|
|
117
166
|
|
|
118
|
-
$\mathbf{A_{sg}^{(\mu)}}$ **- Sugeno integral [1]**
|
|
167
|
+
$\mathbf{A_{sg}^{(\mu)}}$ **- Discrete Sugeno integral [1]**
|
|
119
168
|
|
|
120
169
|
Tags: `averaging` `aggregation interval: [0,1]` `symmetric if μ is symmetric`
|
|
121
170
|
|
|
@@ -149,8 +198,9 @@ $\mu(\emptyset)=0$ and $\mu(N)=1$. The same constructors are available in
|
|
|
149
198
|
descending value rank, so the first belongs to the largest value. In the
|
|
150
199
|
Sugeno integral this capacity is used in the max–min formula; the result is
|
|
151
200
|
not the OWA aggregation.
|
|
152
|
-
- **Exponential cardinality
|
|
153
|
-
|
|
201
|
+
- **Exponential cardinality** (`exponential_cardinality_measure(n, q=1)`):
|
|
202
|
+
$\mu(A)=(|A|/n)^q$, where `q` must be finite and $q>0$.
|
|
203
|
+
For $q=1$, this is the uniform/cardinality measure.
|
|
154
204
|
|
|
155
205
|
$\mathbf{A_{ar}}$ **- Arithmetic mean**
|
|
156
206
|
|
|
@@ -305,3 +355,9 @@ We can construct covex combination of aggregation functions as $A^{(p)}_{A_1,A_2
|
|
|
305
355
|
|
|
306
356
|
1. Beliakov, G., Bustince, H., and Calvo, T.: *A Practical Guide to Averaging Functions*. Berlin: Springer, vol. 329, 2016.
|
|
307
357
|
2. [Mustonen, Seppo. (2010). Logarithmic mean for several arguments. ](https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_arguments)
|
|
358
|
+
# Shiny app
|
|
359
|
+
|
|
360
|
+
A local interface lets you upload a CSV table, select columns and an
|
|
361
|
+
aggregation, add input vectors, and download row-wise results. It also
|
|
362
|
+
generates the equivalent Python code using `aggregationslib.ndarray`.
|
|
363
|
+
See [setup and usage](apps/shiny/README.md).
|
|
@@ -8,20 +8,23 @@ Documentation:
|
|
|
8
8
|
- English: https://wgalka.github.io/Means/en/
|
|
9
9
|
- Polski: https://wgalka.github.io/Means/pl/
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Aggregation functions can be classified in several ways. A familiar distinction
|
|
12
|
+
is between three types of behaviour:
|
|
12
13
|
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
14
|
+
- Conjunctive — an AND-like combination of the inputs.
|
|
15
|
+
- Averaging — a result between the smallest and largest input values.
|
|
16
|
+
- Disjunctive — an OR-like combination of the inputs.
|
|
17
|
+
|
|
18
|
+
These are not the only possibilities: aggregation functions can also exhibit
|
|
19
|
+
mixed behaviour. The diagram below presents a broader classification.
|
|
17
20
|
|
|
18
|
-
.. image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-
|
|
21
|
+
.. image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
|
|
19
22
|
:alt: Classification of aggregation functions
|
|
20
|
-
:target: https://wgalka.github.io/Means/
|
|
23
|
+
:target: https://wgalka.github.io/Means/aggregation_classification.html
|
|
21
24
|
|
|
22
25
|
*Diagram elaborated on the basis of: A. Pradera, G. Beliakov, H. Bustince, B. De Baets, "A review of the relationships between implication, negation and aggregation functions from the point of view of material implication", Information Sciences 329 (2016) 357–380,* `DOI: 10.1016/j.ins.2015.09.033 <https://doi.org/10.1016/j.ins.2015.09.033>`__.
|
|
23
26
|
|
|
24
|
-
An interactive version of this diagram is available at: https://wgalka.github.io/Means/
|
|
27
|
+
An interactive version of this diagram is available at: https://wgalka.github.io/Means/aggregation_classification.html
|
|
25
28
|
|
|
26
29
|
Example 1:
|
|
27
30
|
^^^^^^^^^^
|
|
@@ -84,7 +87,7 @@ intervals. ``[0,1]`` means only the unit interval. These are
|
|
|
84
87
|
mathematical properties; most callable objects do not validate input
|
|
85
88
|
bounds at runtime. Some tags depend on parameters or the fuzzy measure.
|
|
86
89
|
|
|
87
|
-
:math:`\mathbf{A_{ch}^{(\mu)}}` **- Choquet integral [1]**
|
|
90
|
+
:math:`\mathbf{A_{ch}^{(\mu)}}` **- Discrete Choquet integral [1]**
|
|
88
91
|
|
|
89
92
|
Tags: ``averaging`` ``aggregation interval: [0,1]``
|
|
90
93
|
``symmetric if μ is symmetric``
|
|
@@ -120,8 +123,10 @@ Each constructor returns a monotone fuzzy measure with
|
|
|
120
123
|
:math:`\mu(A)=\sum_{j=1}^{|A|}w_j`. The normalized weights are applied
|
|
121
124
|
by descending value rank, so the first belongs to the largest value;
|
|
122
125
|
with the Choquet integral this capacity gives the OWA aggregation.
|
|
123
|
-
- **Exponential cardinality
|
|
124
|
-
|
|
126
|
+
- **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
|
|
127
|
+
:math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
|
|
128
|
+
For :math:`q=1`, this is the uniform/cardinality measure, and the discrete
|
|
129
|
+
Choquet integral equals the arithmetic mean.
|
|
125
130
|
|
|
126
131
|
The constructors are in ``aggregationslib.aggregation``; Decimal
|
|
127
132
|
equivalents are available in ``aggregationslib.decimalaggregations``.
|
|
@@ -135,7 +140,7 @@ two-argument function ``O(x, mu)`` as ``quasi_overlap`` to
|
|
|
135
140
|
``choquet_integral`` or ``A_ch``. The default remains the classical
|
|
136
141
|
product-based Choquet integral.
|
|
137
142
|
|
|
138
|
-
:math:`\mathbf{A_{sg}^{(\mu)}}` **- Sugeno integral [1]**
|
|
143
|
+
:math:`\mathbf{A_{sg}^{(\mu)}}` **- Discrete Sugeno integral [1]**
|
|
139
144
|
|
|
140
145
|
Tags: ``averaging`` ``aggregation interval: [0,1]``
|
|
141
146
|
``symmetric if μ is symmetric``
|
|
@@ -174,8 +179,9 @@ available in ``aggregationslib.aggregation`` and
|
|
|
174
179
|
by descending value rank, so the first belongs to the largest value.
|
|
175
180
|
In the Sugeno integral this capacity is used in the max–min formula;
|
|
176
181
|
the result is not the OWA aggregation.
|
|
177
|
-
- **Exponential cardinality
|
|
178
|
-
|
|
182
|
+
- **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
|
|
183
|
+
:math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
|
|
184
|
+
For :math:`q=1`, this is the uniform/cardinality measure.
|
|
179
185
|
|
|
180
186
|
:math:`\mathbf{A_{ar}}` **- Arithmetic mean**
|
|
181
187
|
|