aggregationslib 0.2.8__tar.gz → 0.2.9__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.
Files changed (104) hide show
  1. {aggregationslib-0.2.8/aggregationslib.egg-info → aggregationslib-0.2.9}/PKG-INFO +78 -23
  2. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/README.md +3 -3
  3. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/README.pl.md +12 -4
  4. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/README.rst +77 -22
  5. {aggregationslib-0.2.8 → aggregationslib-0.2.9/aggregationslib.egg-info}/PKG-INFO +78 -23
  6. aggregationslib-0.2.9/aggregationslib.egg-info/scm_version.json +8 -0
  7. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/README.md +1 -1
  8. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/README.pl.md +1 -1
  9. aggregationslib-0.2.9/docs/en/index.html +548 -0
  10. aggregationslib-0.2.9/docs/pl/index.html +723 -0
  11. aggregationslib-0.2.8/aggregationslib.egg-info/scm_version.json +0 -8
  12. aggregationslib-0.2.8/docs/en/index.html +0 -81
  13. aggregationslib-0.2.8/docs/pl/index.html +0 -81
  14. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/.gitignore +0 -0
  15. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/AGENTS.md +0 -0
  16. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/LICENSE +0 -0
  17. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregation_classification.html +0 -0
  18. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/__init__.py +0 -0
  19. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/aggregation.py +0 -0
  20. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/aggregations.py +0 -0
  21. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/cli.py +0 -0
  22. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/conjuctive/__init__.py +0 -0
  23. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/conjuctive/purepython.py +0 -0
  24. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/decimalaggregations.py +0 -0
  25. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/disjunctive/__init__.py +0 -0
  26. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/example.py +0 -0
  27. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/feature_selection/__init__.py +0 -0
  28. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/feature_selection/binary_fuzzy_entropy.py +0 -0
  29. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/feature_selection/fuzzy_com_entropy.py +0 -0
  30. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/models/__init__.py +0 -0
  31. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/models/ensemble/__init__.py +0 -0
  32. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/models/ensemble/aggregation_regressor.py +0 -0
  33. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/models/single/__init__.py +0 -0
  34. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/ndarray.py +0 -0
  35. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib/purepython.py +0 -0
  36. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib.egg-info/SOURCES.txt +0 -0
  37. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib.egg-info/dependency_links.txt +0 -0
  38. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib.egg-info/entry_points.txt +0 -0
  39. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib.egg-info/requires.txt +0 -0
  40. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib.egg-info/scm_file_list.json +0 -0
  41. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/aggregationslib.egg-info/top_level.txt +0 -0
  42. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/app.py +0 -0
  43. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/column-selection.js +0 -0
  44. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/core.py +0 -0
  45. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/evaluation.py +0 -0
  46. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/apps/shiny/example.csv +0 -0
  47. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/assets/icons/icon.ico +0 -0
  48. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/assets/icons/icon.png +0 -0
  49. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/assets/icons/icon.svg +0 -0
  50. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/build_docs.ps1 +0 -0
  51. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/commands.md +0 -0
  52. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/diagram-aggregation-classification.svg +0 -0
  53. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/diagram-implikacja-agregacja.svg +0 -0
  54. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/diagram-klasyfikacja-agregacji.svg +0 -0
  55. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/diagram-odwzorowanie.svg +0 -0
  56. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/.nojekyll +0 -0
  57. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/CNAME +0 -0
  58. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/aggregation-classes.md +0 -0
  59. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/aggregation-plots.md +0 -0
  60. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/aggregation_classification.html +0 -0
  61. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregation-surfaces-all.png +0 -0
  62. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregation-surfaces.png +0 -0
  63. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_amn_p=0.5.png +0 -0
  64. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_amx_p=0.5.png +0 -0
  65. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_ar.png +0 -0
  66. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_ex2_p=2,q=2.png +0 -0
  67. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_ex3_p=2,q=1.5.png +0 -0
  68. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_ex_r=1.png +0 -0
  69. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_gm.png +0 -0
  70. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_hm.png +0 -0
  71. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_lm_r=2.png +0 -0
  72. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_lo.png +0 -0
  73. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_md.png +0 -0
  74. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_mn.png +0 -0
  75. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_mx.png +0 -0
  76. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_ol.png +0 -0
  77. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_oln_p=1.png +0 -0
  78. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_pr.png +0 -0
  79. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_pw_r=2.png +0 -0
  80. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/aggregations/A_qd.png +0 -0
  81. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/diagram-aggregation-classification.svg +0 -0
  82. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/diagram-klasyfikacja-agregacji.svg +0 -0
  83. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/means-icon.svg +0 -0
  84. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/assets/site.css +0 -0
  85. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/fuzzy-integrals.md +0 -0
  86. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/index.html +0 -0
  87. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/docs/klasyfikacja_agregacji.html +0 -0
  88. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/generate_aggregation_plots.py +0 -0
  89. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/klasyfikacja_agregacji.html +0 -0
  90. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/pyproject.toml +0 -0
  91. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/setup.cfg +0 -0
  92. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/__init__.py +0 -0
  93. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/data/README.md +0 -0
  94. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/data/wolfram_integral_reference.json +0 -0
  95. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/data/wolfram_measure_reference.json +0 -0
  96. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_aggregations.py +0 -0
  97. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_decimal_exponential_mean.py +0 -0
  98. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_decimal_fuzzy_integrals.py +0 -0
  99. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_exponential_cardinality.py +0 -0
  100. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_fuzzy_integrals.py +0 -0
  101. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_ndarray.py +0 -0
  102. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_shiny_app.py +0 -0
  103. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_shiny_evaluation.py +0 -0
  104. {aggregationslib-0.2.8 → aggregationslib-0.2.9}/tests/test_wolfram_measures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aggregationslib
3
- Version: 0.2.8
3
+ Version: 0.2.9
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
@@ -32,33 +32,31 @@ Means, Aggregation functions...
32
32
 
33
33
  Documentation:
34
34
 
35
- - English: https://wgalka.github.io/Means/en/
36
- - Polski: https://wgalka.github.io/Means/pl/
35
+ - `English <https://wgalka.github.io/Means/en/>`__
36
+ - `Polski <https://wgalka.github.io/Means/pl/>`__
37
37
 
38
- **Table of contents**
39
-
40
- - `Example 1 <#example-1>`__
41
- - `Example 2 <#example2>`__
42
- - `Aggregation functions <#aggregation-functions>`__
43
- - `References <#references>`__
44
-
45
- Aggregation functions can be classified in several ways. A familiar distinction
46
- is between three types of behaviour:
38
+ Aggregation functions can be classified in several ways. A familiar
39
+ distinction is between three types of behaviour:
47
40
 
48
41
  - Conjunctive — an AND-like combination of the inputs.
49
42
  - Averaging — a result between the smallest and largest input values.
50
43
  - Disjunctive — an OR-like combination of the inputs.
51
44
 
52
- These are not the only possibilities: aggregation functions can also exhibit
53
- mixed behaviour. The diagram below presents a broader classification.
45
+ These are not the only possibilities: aggregation functions can also
46
+ exhibit mixed behaviour. The diagram below presents a broader
47
+ classification.
54
48
 
55
- .. image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
56
- :alt: Classification of aggregation functions
57
- :target: https://wgalka.github.io/Means/aggregation_classification.html
49
+ |Classification of aggregation functions|
58
50
 
59
- *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>`__.
51
+ *Diagram elaborated on the basis of: A. Pradera, G. Beliakov, H.
52
+ Bustince, B. De Baets, "A review of the relationships between
53
+ implication, negation and aggregation functions from the point of view
54
+ of material implication", Information Sciences 329 (2016) 357–380,*
55
+ `DOI:
56
+ 10.1016/j.ins.2015.09.033 <https://doi.org/10.1016/j.ins.2015.09.033>`__\ *.*
60
57
 
61
- An interactive version of this diagram is available at: https://wgalka.github.io/Means/aggregation_classification.html
58
+ An interactive version of this diagram is available at:
59
+ https://wgalka.github.io/Means/aggregation_classification.html
62
60
 
63
61
  Example 1:
64
62
  ^^^^^^^^^^
@@ -97,6 +95,49 @@ or '**repr**\ ()' methods.
97
95
  print(func3.__repr__()) # function parameters are printed in order: func1, func2
98
96
  >>>A_arpw(r=3)
99
97
 
98
+ Multidimensional arrays
99
+ -----------------------
100
+
101
+ ``aggregationslib.ndarray`` provides the same ``A_...`` objects as
102
+ ``aggregationslib.aggregations``, with additional constructor options
103
+ ``axis`` and ``keepdims``. It applies the existing vector implementation
104
+ separately to each vector along the selected axis.
105
+
106
+ .. code:: python
107
+
108
+ import numpy as np
109
+ from aggregationslib.ndarray import A_ar, A_ch
110
+ from aggregationslib import weighted_measure
111
+
112
+ X = np.array([[0.2, 0.6, 0.9], [0.9, 0.2, 0.6]])
113
+ A_ar(axis=1)(X) # shape (2,): one value per row
114
+ A_ar(axis=0)(X) # shape (3,): one value per column
115
+ A_ar(axis=1, keepdims=True)(X) # shape (2, 1)
116
+ A_ar()(X) # scalar: aggregate all elements
117
+
118
+ mu = weighted_measure([0.5, 0.3, 0.2])
119
+ A_ch(measure=mu, axis=-1)(X) # array([0.46, 0.63])
120
+
121
+ ``axis=None`` (the default) flattens the input in C order. An integer
122
+ axis, including a negative index, reduces that axis; tuples of axes are
123
+ not supported. For an input of shape ``(m, n)``, ``axis=1`` returns
124
+ shape ``(m,)``, including ``(1,)`` when there is just one row.
125
+ ``keepdims=True`` retains reduced dimensions with length one. A complete
126
+ reduction returns a scalar unless ``keepdims=True``.
127
+
128
+ Choquet and Sugeno use the same measure for each vector. Its size must
129
+ match the selected axis length, or the total element count for
130
+ ``axis=None``. Choquet's ``quasi_overlap`` continues to accept scalar
131
+ callbacks. ``Combine2Aggregations`` accepts vector callables or objects
132
+ from this module; the combination's own ``axis`` and ``keepdims``
133
+ control the reduction.
134
+
135
+ Empty vectors are rejected. An empty batch of nonempty vectors returns
136
+ an empty floating-point array of the appropriate shape. The mathematical
137
+ domains, parameter rules and numerical behavior are inherited from the
138
+ vector implementations. This module uses iteration over vectors, not
139
+ vectorized implementations of the aggregation formulas.
140
+
100
141
  Aggregation functions
101
142
  ---------------------
102
143
 
@@ -157,10 +198,11 @@ Each constructor returns a monotone fuzzy measure with
157
198
  :math:`\mu(A)=\sum_{j=1}^{|A|}w_j`. The normalized weights are applied
158
199
  by descending value rank, so the first belongs to the largest value;
159
200
  with the Choquet integral this capacity gives the OWA aggregation.
160
- - **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
201
+ - **Exponential cardinality**
202
+ (``exponential_cardinality_measure(n, q=1)``):
161
203
  :math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
162
- For :math:`q=1`, this is the uniform/cardinality measure, and the discrete
163
- Choquet integral equals the arithmetic mean.
204
+ For :math:`q=1`, this is the uniform/cardinality measure, and the
205
+ discrete Choquet integral equals the arithmetic mean.
164
206
 
165
207
  The constructors are in ``aggregationslib.aggregation``; Decimal
166
208
  equivalents are available in ``aggregationslib.decimalaggregations``.
@@ -213,7 +255,8 @@ available in ``aggregationslib.aggregation`` and
213
255
  by descending value rank, so the first belongs to the largest value.
214
256
  In the Sugeno integral this capacity is used in the max–min formula;
215
257
  the result is not the OWA aggregation.
216
- - **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
258
+ - **Exponential cardinality**
259
+ (``exponential_cardinality_measure(n, q=1)``):
217
260
  :math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
218
261
  For :math:`q=1`, this is the uniform/cardinality measure.
219
262
 
@@ -408,3 +451,15 @@ References
408
451
  Averaging Functions*. Berlin: Springer, vol. 329, 2016.
409
452
  2. `Mustonen, Seppo. (2010). Logarithmic mean for several
410
453
  arguments. <https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_arguments>`__
454
+
455
+ Shiny app
456
+ =========
457
+
458
+ A local interface lets you upload a CSV table, select columns and an
459
+ aggregation, add input vectors, and download row-wise results. It also
460
+ generates the equivalent Python code using ``aggregationslib.ndarray``.
461
+ See `setup and
462
+ usage <https://github.com/wgalka/Means/blob/main/apps/shiny/README.md>`__.
463
+
464
+ .. |Classification of aggregation functions| image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
465
+ :target: https://wgalka.github.io/Means/aggregation_classification.html
@@ -3,8 +3,8 @@ Means, Aggregation functions...
3
3
 
4
4
  Documentation:
5
5
 
6
- - English: https://wgalka.github.io/Means/en/
7
- - Polski: https://wgalka.github.io/Means/pl/
6
+ - [English](https://wgalka.github.io/Means/en/)
7
+ - [Polski](https://wgalka.github.io/Means/pl/)
8
8
 
9
9
  Aggregation functions can be classified in several ways. A familiar distinction
10
10
  is between three types of behaviour:
@@ -360,4 +360,4 @@ We can construct covex combination of aggregation functions as $A^{(p)}_{A_1,A_2
360
360
  A local interface lets you upload a CSV table, select columns and an
361
361
  aggregation, add input vectors, and download row-wise results. It also
362
362
  generates the equivalent Python code using `aggregationslib.ndarray`.
363
- See [setup and usage](apps/shiny/README.md).
363
+ See [setup and usage](https://github.com/wgalka/Means/blob/main/apps/shiny/README.md).
@@ -76,7 +76,7 @@ Przy domyślnej mierze `mu(A) = |A| / n` całka Choqueta jest równa średniej
76
76
  arytmetycznej: $C_\mu(x_1,\dots,x_n)=(1/n)\sum_{i=1}^n x_i$. Wersje `float` mogą różnić
77
77
  się od średniej na ostatnich bitach wskutek zaokrągleń.
78
78
 
79
- Szczegóły i przykłady: [całki rozmyte](docs/fuzzy-integrals.md).
79
+ Szczegóły i przykłady: [całki rozmyte](https://github.com/wgalka/Means/blob/main/docs/fuzzy-integrals.md).
80
80
 
81
81
  ## Zbiory klasyczne i rozmyte
82
82
 
@@ -409,7 +409,7 @@ z biblioteki. Zakres jest dobierany osobno dla każdej funkcji, dlatego część
409
409
  wykresów pokazuje wartości spoza `[0,1]`, a funkcje wymagające dodatnich
410
410
  argumentów są rysowane na dziedzinie dodatniej:
411
411
 
412
- ![Powierzchnie 3D wszystkich funkcji agregujących](docs/assets/aggregation-surfaces-all.png)
412
+ ![Powierzchnie 3D wszystkich funkcji agregujących](https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/aggregation-surfaces-all.png)
413
413
 
414
414
  Wykres można odtworzyć poleceniem:
415
415
 
@@ -418,7 +418,7 @@ python .\generate_aggregation_plots.py
418
418
  ```
419
419
 
420
420
  Każdy wykres jest również dostępny osobno w
421
- [`docs/aggregation-plots.md`](docs/aggregation-plots.md), pod nazwą swojej
421
+ [`docs/aggregation-plots.md`](https://github.com/wgalka/Means/blob/main/docs/aggregation-plots.md), pod nazwą swojej
422
422
  funkcji, np. `A_amx`.
423
423
 
424
424
  OWA jest zwykle symetryczny, monotoniczny i idempotentny. W niektórych
@@ -537,7 +537,7 @@ Dla argumentów `2, 5, 8` funkcja averaging musi spełniać:
537
537
  Średnia arytmetyczna daje w tym przykładzie `5`.
538
538
 
539
539
  Wizualny schemat klas agregacji znajduje się w pliku
540
- [`docs/aggregation-classes.md`](docs/aggregation-classes.md).
540
+ [`docs/aggregation-classes.md`](https://github.com/wgalka/Means/blob/main/docs/aggregation-classes.md).
541
541
 
542
542
  ## Funkcja dualna i samodualność
543
543
 
@@ -739,3 +739,11 @@ A_arpw(r=3)
739
739
  2. Mustonen, Seppo (2010):
740
740
  [Logarithmic mean for several arguments](https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_arguments).
741
741
  3. [Aggregation functions](https://arxiv.org/pdf/2208.01644).
742
+
743
+ # Aplikacja Shiny
744
+
745
+ Lokalny interfejs pozwala wgrać tabelę CSV, wybrać kolumny oraz funkcję
746
+ agregacji, dopisać dodatkowe wektory i pobrać wyniki dla poszczególnych
747
+ wierszy. Generuje także równoważny kod w Pythonie z użyciem
748
+ `aggregationslib.ndarray`.
749
+ Zobacz [instalację i instrukcję użycia](https://github.com/wgalka/Means/blob/main/apps/shiny/README.pl.md).
@@ -5,33 +5,31 @@ Means, Aggregation functions...
5
5
 
6
6
  Documentation:
7
7
 
8
- - English: https://wgalka.github.io/Means/en/
9
- - Polski: https://wgalka.github.io/Means/pl/
8
+ - `English <https://wgalka.github.io/Means/en/>`__
9
+ - `Polski <https://wgalka.github.io/Means/pl/>`__
10
10
 
11
- **Table of contents**
12
-
13
- - `Example 1 <#example-1>`__
14
- - `Example 2 <#example2>`__
15
- - `Aggregation functions <#aggregation-functions>`__
16
- - `References <#references>`__
17
-
18
- Aggregation functions can be classified in several ways. A familiar distinction
19
- is between three types of behaviour:
11
+ Aggregation functions can be classified in several ways. A familiar
12
+ distinction is between three types of behaviour:
20
13
 
21
14
  - Conjunctive — an AND-like combination of the inputs.
22
15
  - Averaging — a result between the smallest and largest input values.
23
16
  - Disjunctive — an OR-like combination of the inputs.
24
17
 
25
- These are not the only possibilities: aggregation functions can also exhibit
26
- mixed behaviour. The diagram below presents a broader classification.
18
+ These are not the only possibilities: aggregation functions can also
19
+ exhibit mixed behaviour. The diagram below presents a broader
20
+ classification.
27
21
 
28
- .. image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
29
- :alt: Classification of aggregation functions
30
- :target: https://wgalka.github.io/Means/aggregation_classification.html
22
+ |Classification of aggregation functions|
31
23
 
32
- *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>`__.
24
+ *Diagram elaborated on the basis of: A. Pradera, G. Beliakov, H.
25
+ Bustince, B. De Baets, "A review of the relationships between
26
+ implication, negation and aggregation functions from the point of view
27
+ of material implication", Information Sciences 329 (2016) 357–380,*
28
+ `DOI:
29
+ 10.1016/j.ins.2015.09.033 <https://doi.org/10.1016/j.ins.2015.09.033>`__\ *.*
33
30
 
34
- An interactive version of this diagram is available at: https://wgalka.github.io/Means/aggregation_classification.html
31
+ An interactive version of this diagram is available at:
32
+ https://wgalka.github.io/Means/aggregation_classification.html
35
33
 
36
34
  Example 1:
37
35
  ^^^^^^^^^^
@@ -70,6 +68,49 @@ or '**repr**\ ()' methods.
70
68
  print(func3.__repr__()) # function parameters are printed in order: func1, func2
71
69
  >>>A_arpw(r=3)
72
70
 
71
+ Multidimensional arrays
72
+ -----------------------
73
+
74
+ ``aggregationslib.ndarray`` provides the same ``A_...`` objects as
75
+ ``aggregationslib.aggregations``, with additional constructor options
76
+ ``axis`` and ``keepdims``. It applies the existing vector implementation
77
+ separately to each vector along the selected axis.
78
+
79
+ .. code:: python
80
+
81
+ import numpy as np
82
+ from aggregationslib.ndarray import A_ar, A_ch
83
+ from aggregationslib import weighted_measure
84
+
85
+ X = np.array([[0.2, 0.6, 0.9], [0.9, 0.2, 0.6]])
86
+ A_ar(axis=1)(X) # shape (2,): one value per row
87
+ A_ar(axis=0)(X) # shape (3,): one value per column
88
+ A_ar(axis=1, keepdims=True)(X) # shape (2, 1)
89
+ A_ar()(X) # scalar: aggregate all elements
90
+
91
+ mu = weighted_measure([0.5, 0.3, 0.2])
92
+ A_ch(measure=mu, axis=-1)(X) # array([0.46, 0.63])
93
+
94
+ ``axis=None`` (the default) flattens the input in C order. An integer
95
+ axis, including a negative index, reduces that axis; tuples of axes are
96
+ not supported. For an input of shape ``(m, n)``, ``axis=1`` returns
97
+ shape ``(m,)``, including ``(1,)`` when there is just one row.
98
+ ``keepdims=True`` retains reduced dimensions with length one. A complete
99
+ reduction returns a scalar unless ``keepdims=True``.
100
+
101
+ Choquet and Sugeno use the same measure for each vector. Its size must
102
+ match the selected axis length, or the total element count for
103
+ ``axis=None``. Choquet's ``quasi_overlap`` continues to accept scalar
104
+ callbacks. ``Combine2Aggregations`` accepts vector callables or objects
105
+ from this module; the combination's own ``axis`` and ``keepdims``
106
+ control the reduction.
107
+
108
+ Empty vectors are rejected. An empty batch of nonempty vectors returns
109
+ an empty floating-point array of the appropriate shape. The mathematical
110
+ domains, parameter rules and numerical behavior are inherited from the
111
+ vector implementations. This module uses iteration over vectors, not
112
+ vectorized implementations of the aggregation formulas.
113
+
73
114
  Aggregation functions
74
115
  ---------------------
75
116
 
@@ -130,10 +171,11 @@ Each constructor returns a monotone fuzzy measure with
130
171
  :math:`\mu(A)=\sum_{j=1}^{|A|}w_j`. The normalized weights are applied
131
172
  by descending value rank, so the first belongs to the largest value;
132
173
  with the Choquet integral this capacity gives the OWA aggregation.
133
- - **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
174
+ - **Exponential cardinality**
175
+ (``exponential_cardinality_measure(n, q=1)``):
134
176
  :math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
135
- For :math:`q=1`, this is the uniform/cardinality measure, and the discrete
136
- Choquet integral equals the arithmetic mean.
177
+ For :math:`q=1`, this is the uniform/cardinality measure, and the
178
+ discrete Choquet integral equals the arithmetic mean.
137
179
 
138
180
  The constructors are in ``aggregationslib.aggregation``; Decimal
139
181
  equivalents are available in ``aggregationslib.decimalaggregations``.
@@ -186,7 +228,8 @@ available in ``aggregationslib.aggregation`` and
186
228
  by descending value rank, so the first belongs to the largest value.
187
229
  In the Sugeno integral this capacity is used in the max–min formula;
188
230
  the result is not the OWA aggregation.
189
- - **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
231
+ - **Exponential cardinality**
232
+ (``exponential_cardinality_measure(n, q=1)``):
190
233
  :math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
191
234
  For :math:`q=1`, this is the uniform/cardinality measure.
192
235
 
@@ -381,3 +424,15 @@ References
381
424
  Averaging Functions*. Berlin: Springer, vol. 329, 2016.
382
425
  2. `Mustonen, Seppo. (2010). Logarithmic mean for several
383
426
  arguments. <https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_arguments>`__
427
+
428
+ Shiny app
429
+ =========
430
+
431
+ A local interface lets you upload a CSV table, select columns and an
432
+ aggregation, add input vectors, and download row-wise results. It also
433
+ generates the equivalent Python code using ``aggregationslib.ndarray``.
434
+ See `setup and
435
+ usage <https://github.com/wgalka/Means/blob/main/apps/shiny/README.md>`__.
436
+
437
+ .. |Classification of aggregation functions| image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
438
+ :target: https://wgalka.github.io/Means/aggregation_classification.html
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aggregationslib
3
- Version: 0.2.8
3
+ Version: 0.2.9
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
@@ -32,33 +32,31 @@ Means, Aggregation functions...
32
32
 
33
33
  Documentation:
34
34
 
35
- - English: https://wgalka.github.io/Means/en/
36
- - Polski: https://wgalka.github.io/Means/pl/
35
+ - `English <https://wgalka.github.io/Means/en/>`__
36
+ - `Polski <https://wgalka.github.io/Means/pl/>`__
37
37
 
38
- **Table of contents**
39
-
40
- - `Example 1 <#example-1>`__
41
- - `Example 2 <#example2>`__
42
- - `Aggregation functions <#aggregation-functions>`__
43
- - `References <#references>`__
44
-
45
- Aggregation functions can be classified in several ways. A familiar distinction
46
- is between three types of behaviour:
38
+ Aggregation functions can be classified in several ways. A familiar
39
+ distinction is between three types of behaviour:
47
40
 
48
41
  - Conjunctive — an AND-like combination of the inputs.
49
42
  - Averaging — a result between the smallest and largest input values.
50
43
  - Disjunctive — an OR-like combination of the inputs.
51
44
 
52
- These are not the only possibilities: aggregation functions can also exhibit
53
- mixed behaviour. The diagram below presents a broader classification.
45
+ These are not the only possibilities: aggregation functions can also
46
+ exhibit mixed behaviour. The diagram below presents a broader
47
+ classification.
54
48
 
55
- .. image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
56
- :alt: Classification of aggregation functions
57
- :target: https://wgalka.github.io/Means/aggregation_classification.html
49
+ |Classification of aggregation functions|
58
50
 
59
- *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>`__.
51
+ *Diagram elaborated on the basis of: A. Pradera, G. Beliakov, H.
52
+ Bustince, B. De Baets, "A review of the relationships between
53
+ implication, negation and aggregation functions from the point of view
54
+ of material implication", Information Sciences 329 (2016) 357–380,*
55
+ `DOI:
56
+ 10.1016/j.ins.2015.09.033 <https://doi.org/10.1016/j.ins.2015.09.033>`__\ *.*
60
57
 
61
- An interactive version of this diagram is available at: https://wgalka.github.io/Means/aggregation_classification.html
58
+ An interactive version of this diagram is available at:
59
+ https://wgalka.github.io/Means/aggregation_classification.html
62
60
 
63
61
  Example 1:
64
62
  ^^^^^^^^^^
@@ -97,6 +95,49 @@ or '**repr**\ ()' methods.
97
95
  print(func3.__repr__()) # function parameters are printed in order: func1, func2
98
96
  >>>A_arpw(r=3)
99
97
 
98
+ Multidimensional arrays
99
+ -----------------------
100
+
101
+ ``aggregationslib.ndarray`` provides the same ``A_...`` objects as
102
+ ``aggregationslib.aggregations``, with additional constructor options
103
+ ``axis`` and ``keepdims``. It applies the existing vector implementation
104
+ separately to each vector along the selected axis.
105
+
106
+ .. code:: python
107
+
108
+ import numpy as np
109
+ from aggregationslib.ndarray import A_ar, A_ch
110
+ from aggregationslib import weighted_measure
111
+
112
+ X = np.array([[0.2, 0.6, 0.9], [0.9, 0.2, 0.6]])
113
+ A_ar(axis=1)(X) # shape (2,): one value per row
114
+ A_ar(axis=0)(X) # shape (3,): one value per column
115
+ A_ar(axis=1, keepdims=True)(X) # shape (2, 1)
116
+ A_ar()(X) # scalar: aggregate all elements
117
+
118
+ mu = weighted_measure([0.5, 0.3, 0.2])
119
+ A_ch(measure=mu, axis=-1)(X) # array([0.46, 0.63])
120
+
121
+ ``axis=None`` (the default) flattens the input in C order. An integer
122
+ axis, including a negative index, reduces that axis; tuples of axes are
123
+ not supported. For an input of shape ``(m, n)``, ``axis=1`` returns
124
+ shape ``(m,)``, including ``(1,)`` when there is just one row.
125
+ ``keepdims=True`` retains reduced dimensions with length one. A complete
126
+ reduction returns a scalar unless ``keepdims=True``.
127
+
128
+ Choquet and Sugeno use the same measure for each vector. Its size must
129
+ match the selected axis length, or the total element count for
130
+ ``axis=None``. Choquet's ``quasi_overlap`` continues to accept scalar
131
+ callbacks. ``Combine2Aggregations`` accepts vector callables or objects
132
+ from this module; the combination's own ``axis`` and ``keepdims``
133
+ control the reduction.
134
+
135
+ Empty vectors are rejected. An empty batch of nonempty vectors returns
136
+ an empty floating-point array of the appropriate shape. The mathematical
137
+ domains, parameter rules and numerical behavior are inherited from the
138
+ vector implementations. This module uses iteration over vectors, not
139
+ vectorized implementations of the aggregation formulas.
140
+
100
141
  Aggregation functions
101
142
  ---------------------
102
143
 
@@ -157,10 +198,11 @@ Each constructor returns a monotone fuzzy measure with
157
198
  :math:`\mu(A)=\sum_{j=1}^{|A|}w_j`. The normalized weights are applied
158
199
  by descending value rank, so the first belongs to the largest value;
159
200
  with the Choquet integral this capacity gives the OWA aggregation.
160
- - **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
201
+ - **Exponential cardinality**
202
+ (``exponential_cardinality_measure(n, q=1)``):
161
203
  :math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
162
- For :math:`q=1`, this is the uniform/cardinality measure, and the discrete
163
- Choquet integral equals the arithmetic mean.
204
+ For :math:`q=1`, this is the uniform/cardinality measure, and the
205
+ discrete Choquet integral equals the arithmetic mean.
164
206
 
165
207
  The constructors are in ``aggregationslib.aggregation``; Decimal
166
208
  equivalents are available in ``aggregationslib.decimalaggregations``.
@@ -213,7 +255,8 @@ available in ``aggregationslib.aggregation`` and
213
255
  by descending value rank, so the first belongs to the largest value.
214
256
  In the Sugeno integral this capacity is used in the max–min formula;
215
257
  the result is not the OWA aggregation.
216
- - **Exponential cardinality** (``exponential_cardinality_measure(n, q=1)``):
258
+ - **Exponential cardinality**
259
+ (``exponential_cardinality_measure(n, q=1)``):
217
260
  :math:`\mu(A)=(|A|/n)^q`, where ``q`` must be finite and :math:`q>0`.
218
261
  For :math:`q=1`, this is the uniform/cardinality measure.
219
262
 
@@ -408,3 +451,15 @@ References
408
451
  Averaging Functions*. Berlin: Springer, vol. 329, 2016.
409
452
  2. `Mustonen, Seppo. (2010). Logarithmic mean for several
410
453
  arguments. <https://www.researchgate.net/publication/228886844_Logarithmic_mean_for_several_arguments>`__
454
+
455
+ Shiny app
456
+ =========
457
+
458
+ A local interface lets you upload a CSV table, select columns and an
459
+ aggregation, add input vectors, and download row-wise results. It also
460
+ generates the equivalent Python code using ``aggregationslib.ndarray``.
461
+ See `setup and
462
+ usage <https://github.com/wgalka/Means/blob/main/apps/shiny/README.md>`__.
463
+
464
+ .. |Classification of aggregation functions| image:: https://raw.githubusercontent.com/wgalka/Means/main/docs/assets/diagram-aggregation-classification.svg
465
+ :target: https://wgalka.github.io/Means/aggregation_classification.html
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.2.9",
3
+ "distance": 0,
4
+ "node": "g0fc1b845dad92608baef22ca733a02541b9c7c52",
5
+ "dirty": false,
6
+ "branch": "main",
7
+ "node_date": "2026-11-17"
8
+ }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Graphical interface for computing aggregation functions on tabular data and evaluating binary classification.
4
4
 
5
- *Wersja polska: [README.pl.md](README.pl.md)*
5
+ *Wersja polska: [README.pl.md](https://github.com/wgalka/Means/blob/main/apps/shiny/README.pl.md)*
6
6
 
7
7
  ## Getting Started
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Graficzny interfejs do obliczania funkcji agregacji na danych tabelarycznych oraz oceny klasyfikacji binarnej.
4
4
 
5
- *English version: [README.md](README.md)*
5
+ *English version: [README.md](https://github.com/wgalka/Means/blob/main/apps/shiny/README.md)*
6
6
 
7
7
  ## Uruchomienie
8
8