pyfdm 1.2.1__tar.gz → 1.2.2__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.
- {pyfdm-1.2.1 → pyfdm-1.2.2}/CHANGELOG.md +9 -0
- {pyfdm-1.2.1/pyfdm.egg-info → pyfdm-1.2.2}/PKG-INFO +4 -4
- {pyfdm-1.2.1 → pyfdm-1.2.2}/README.md +3 -3
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/__init__.py +1 -1
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/__init__.py +5 -5
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_aras.py +18 -7
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_codas.py +14 -3
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_mabac.py +6 -3
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_topsis.py +15 -6
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/utils/helpers.py +25 -1
- {pyfdm-1.2.1 → pyfdm-1.2.2/pyfdm.egg-info}/PKG-INFO +4 -4
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyproject.toml +1 -1
- {pyfdm-1.2.1 → pyfdm-1.2.2}/setup.py +1 -1
- {pyfdm-1.2.1 → pyfdm-1.2.2}/LICENSE +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/MANIFEST.in +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/TFN/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/TFN/tfn.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/correlations.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/expert/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/expert/collector.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/expert/exporter.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/expert/scales.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/multiple_tfn_plot.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/s_norm_tfn_plot.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/single_tfn_plot.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/t_norm_tfn_plot.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/tfn_criteria_plot.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/graphs/tfn_membership_plot.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/group/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/group/aggregation.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/helpers.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/_base.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_aroman.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_cocoso.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_copras.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_edas.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_ervd.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_mairca.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_marcos.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_moora.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_ocra.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_piv.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_rafsi.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_rim.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_spotis.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_vikor.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_waspas.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_wpm.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/methods/f_wsm.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/step_logger.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/utils/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/utils/defuzzifications.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/utils/distances.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/utils/normalizations.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/utils/ranking.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/validator.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/objective.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/__init__.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/_base.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/f_ahp.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/f_bwm.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/f_fucom.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/f_lmaw.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/f_rancom.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm/weights/subjective/f_swara.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm.egg-info/SOURCES.txt +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm.egg-info/dependency_links.txt +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm.egg-info/requires.txt +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/pyfdm.egg-info/top_level.txt +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/setup.cfg +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_aggregation.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_correlations.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_expert_collector.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_fuzzy_exporter.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_methods.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_ranking.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_scales.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_step_logger.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_validator.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_weights_objective.py +0 -0
- {pyfdm-1.2.1 → pyfdm-1.2.2}/tests/test_weights_subjective.py +0 -0
|
@@ -6,6 +6,15 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [1.2.2] — 2026
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **fTOPSIS**: Criterion types (`types`) were ignored when using type-agnostic normalizations (`vector_normalization`, `saw_normalization`, `sqrt_normalization`). Positive and negative ideal solutions are now constructed depending on criterion direction for these normalizations, while type-aware normalizations retain the classical ones/zeros reference points.
|
|
14
|
+
- **fCODAS**: Negative solution (NS) was always computed as the column-wise minimum, which produced incorrect rankings for cost criteria under type-agnostic normalizations. NS is now type-dependent when the selected normalization does not invert cost criteria.
|
|
15
|
+
- **fMABAC**: Cost criteria were treated as benefit criteria after type-agnostic normalization. Cost columns are now inverted after normalization when needed, so that higher values consistently represent better performance before computing the Border Approximation Area.
|
|
16
|
+
- **fARAS**: The ideal alternative row was always built using maximum values, and cost criteria were not handled correctly with type-agnostic normalizations (leading to preference scores > 1 and unchanged rankings). The ideal row is now type-aware, and cost columns are inverted after normalization when required so that the ideal alternative has the highest utility.
|
|
17
|
+
|
|
9
18
|
## [1.2.1] — 2026
|
|
10
19
|
|
|
11
20
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyfdm
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Python library for Fuzzy Decision Making based on Triangular Fuzzy Numbers
|
|
5
5
|
Home-page: https://github.com/jwieckowski/pyfdm
|
|
6
6
|
Author: Jakub Więckowski
|
|
@@ -40,7 +40,7 @@ Dynamic: requires-python
|
|
|
40
40
|
|
|
41
41
|
Python 3 package with Fuzzy Decision Making (PyFDM) methods based on Triangular Fuzzy Numbers (TFN).
|
|
42
42
|
|
|
43
|
-
**Version 1.2.
|
|
43
|
+
**Version 1.2.2** adds 6 new MCDA methods, 6 subjective weighting methods, an expert-data collection and export module, group aggregation, step-by-step intermediate result inspection, and a standalone ranking utility — on top of a refactored, more robust core architecture. See [What's new in 1.2.2](#whats-new-in-120) below.
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ Python 3 package with Fuzzy Decision Making (PyFDM) methods based on Triangular
|
|
|
49
49
|
- [Installation](#installation)
|
|
50
50
|
- [Local development setup](#local-development-setup)
|
|
51
51
|
- [Testing](#testing)
|
|
52
|
-
- [What's new in 1.2.
|
|
52
|
+
- [What's new in 1.2.2](#whats-new-in-120)
|
|
53
53
|
- [Modules and functionalities](#modules-and-functionalities)
|
|
54
54
|
- [Usage examples](#usage-examples)
|
|
55
55
|
- [Citations](#citations)
|
|
@@ -156,7 +156,7 @@ All tests are expected to pass with zero `DeprecationWarning`s on a clean checko
|
|
|
156
156
|
|
|
157
157
|
---
|
|
158
158
|
|
|
159
|
-
# What's new in 1.2.
|
|
159
|
+
# What's new in 1.2.2
|
|
160
160
|
|
|
161
161
|
### Architecture
|
|
162
162
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Python 3 package with Fuzzy Decision Making (PyFDM) methods based on Triangular Fuzzy Numbers (TFN).
|
|
4
4
|
|
|
5
|
-
**Version 1.2.
|
|
5
|
+
**Version 1.2.2** adds 6 new MCDA methods, 6 subjective weighting methods, an expert-data collection and export module, group aggregation, step-by-step intermediate result inspection, and a standalone ranking utility — on top of a refactored, more robust core architecture. See [What's new in 1.2.2](#whats-new-in-120) below.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ Python 3 package with Fuzzy Decision Making (PyFDM) methods based on Triangular
|
|
|
11
11
|
- [Installation](#installation)
|
|
12
12
|
- [Local development setup](#local-development-setup)
|
|
13
13
|
- [Testing](#testing)
|
|
14
|
-
- [What's new in 1.2.
|
|
14
|
+
- [What's new in 1.2.2](#whats-new-in-120)
|
|
15
15
|
- [Modules and functionalities](#modules-and-functionalities)
|
|
16
16
|
- [Usage examples](#usage-examples)
|
|
17
17
|
- [Citations](#citations)
|
|
@@ -118,7 +118,7 @@ All tests are expected to pass with zero `DeprecationWarning`s on a clean checko
|
|
|
118
118
|
|
|
119
119
|
---
|
|
120
120
|
|
|
121
|
-
# What's new in 1.2.
|
|
121
|
+
# What's new in 1.2.2
|
|
122
122
|
|
|
123
123
|
### Architecture
|
|
124
124
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from .multiple_tfn_plot import multiple_tfn_plot
|
|
2
|
-
from .s_norm_tfn_plot import s_norm_tfn_plot
|
|
3
|
-
from .single_tfn_plot import single_tfn_plot
|
|
4
|
-
from .t_norm_tfn_plot import t_norm_tfn_plot
|
|
5
|
-
from .tfn_criteria_plot import tfn_criteria_plot
|
|
1
|
+
from .multiple_tfn_plot import multiple_tfn_plot
|
|
2
|
+
from .s_norm_tfn_plot import s_norm_tfn_plot
|
|
3
|
+
from .single_tfn_plot import single_tfn_plot
|
|
4
|
+
from .t_norm_tfn_plot import t_norm_tfn_plot
|
|
5
|
+
from .tfn_criteria_plot import tfn_criteria_plot
|
|
6
6
|
from .tfn_membership_plot import tfn_membership_plot
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
5
|
from ._base import BaseFuzzyMethod
|
|
6
|
-
from ..validator import Validator
|
|
7
6
|
from ..step_logger import StepLogger
|
|
8
|
-
from ..utils
|
|
7
|
+
from ..utils import sum_normalization, is_type_aware_normalization
|
|
9
8
|
|
|
10
9
|
class fARAS(BaseFuzzyMethod):
|
|
11
10
|
"""
|
|
@@ -157,11 +156,17 @@ class fARAS(BaseFuzzyMethod):
|
|
|
157
156
|
(matrix.shape[0]+1, matrix.shape[1], matrix.shape[2]), dtype=object)
|
|
158
157
|
exmatrix[1:] = matrix
|
|
159
158
|
|
|
160
|
-
|
|
161
|
-
np.max(np.max(matrix, axis=0), axis=1), 3
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
if is_type_aware_normalization(self.normalization):
|
|
160
|
+
ideal_row = np.repeat(np.max(np.max(matrix, axis=0), axis=1), 3).reshape(matrix.shape[1], matrix.shape[2])
|
|
161
|
+
else:
|
|
162
|
+
ideal_row = np.empty((matrix.shape[1], 3), dtype=float)
|
|
163
|
+
for j in range(matrix.shape[1]):
|
|
164
|
+
if types[j] == 1:
|
|
165
|
+
ideal_row[j] = np.max(matrix[:, j], axis=0)
|
|
166
|
+
else:
|
|
167
|
+
ideal_row[j] = np.min(matrix[:, j], axis=0)
|
|
168
|
+
|
|
169
|
+
exmatrix[0] = ideal_row
|
|
165
170
|
except Exception as e:
|
|
166
171
|
raise RuntimeError(f"Failed to build the extended matrix: {e}") from e
|
|
167
172
|
|
|
@@ -177,6 +182,12 @@ class fARAS(BaseFuzzyMethod):
|
|
|
177
182
|
except Exception as e:
|
|
178
183
|
raise RuntimeError(f"Normalization step failed: {e}") from e
|
|
179
184
|
|
|
185
|
+
if not is_type_aware_normalization(self.normalization):
|
|
186
|
+
for j in range(nmatrix.shape[1]):
|
|
187
|
+
if types[j] == -1:
|
|
188
|
+
col_max = np.max(nmatrix[:, j], axis=0)
|
|
189
|
+
nmatrix[:, j] = col_max - nmatrix[:, j]
|
|
190
|
+
|
|
180
191
|
self._log_step(
|
|
181
192
|
self.logger,
|
|
182
193
|
'Normalized matrix',
|
|
@@ -5,8 +5,10 @@ from typing import Any
|
|
|
5
5
|
|
|
6
6
|
from ._base import BaseFuzzyMethod
|
|
7
7
|
from ..step_logger import StepLogger
|
|
8
|
-
from ..utils import
|
|
9
|
-
|
|
8
|
+
from ..utils import (
|
|
9
|
+
max_normalization, euclidean_distance,
|
|
10
|
+
hamming_distance, is_type_aware_normalization
|
|
11
|
+
)
|
|
10
12
|
|
|
11
13
|
class fCODAS(BaseFuzzyMethod):
|
|
12
14
|
"""
|
|
@@ -203,7 +205,16 @@ class fCODAS(BaseFuzzyMethod):
|
|
|
203
205
|
self._log_step(self.logger, 'Weighted normalized matrix', wmatrix, 'Element-wise product of normalized matrix and weights')
|
|
204
206
|
|
|
205
207
|
try:
|
|
206
|
-
|
|
208
|
+
if is_type_aware_normalization(self.normalization):
|
|
209
|
+
NS = np.min(wmatrix, axis=0)
|
|
210
|
+
else:
|
|
211
|
+
NS = np.empty((matrix.shape[1], 3), dtype=float)
|
|
212
|
+
for j in range(matrix.shape[1]):
|
|
213
|
+
col = wmatrix[:, j]
|
|
214
|
+
if types[j] == 1: # benefit → worst = min
|
|
215
|
+
NS[j] = np.min(col, axis=0)
|
|
216
|
+
else: # cost → worst = max
|
|
217
|
+
NS[j] = np.max(col, axis=0)
|
|
207
218
|
except Exception as e:
|
|
208
219
|
raise RuntimeError(f"Failed to compute the fuzzy negative solution: {e}") from e
|
|
209
220
|
|
|
@@ -5,9 +5,7 @@ from typing import Any
|
|
|
5
5
|
|
|
6
6
|
from ._base import BaseFuzzyMethod
|
|
7
7
|
from ..step_logger import StepLogger
|
|
8
|
-
from ..utils import mean_defuzzification
|
|
9
|
-
from ..utils import minmax_normalization
|
|
10
|
-
|
|
8
|
+
from ..utils import mean_defuzzification, minmax_normalization, is_type_aware_normalization
|
|
11
9
|
|
|
12
10
|
class fMABAC(BaseFuzzyMethod):
|
|
13
11
|
"""
|
|
@@ -170,6 +168,11 @@ class fMABAC(BaseFuzzyMethod):
|
|
|
170
168
|
except Exception as e:
|
|
171
169
|
raise RuntimeError(f"Normalization step failed: {e}") from e
|
|
172
170
|
|
|
171
|
+
if not is_type_aware_normalization(self.normalization):
|
|
172
|
+
for j in range(nmatrix.shape[1]):
|
|
173
|
+
if types[j] == -1:
|
|
174
|
+
nmatrix[:, j] = 1 - nmatrix[:, j]
|
|
175
|
+
|
|
173
176
|
self._log_step(
|
|
174
177
|
self.logger,
|
|
175
178
|
'Normalized matrix',
|
|
@@ -5,7 +5,7 @@ from typing import Any
|
|
|
5
5
|
|
|
6
6
|
from ._base import BaseFuzzyMethod
|
|
7
7
|
from ..step_logger import StepLogger
|
|
8
|
-
from ..utils import linear_normalization, vertex_distance
|
|
8
|
+
from ..utils import linear_normalization, vertex_distance, is_type_aware_normalization
|
|
9
9
|
|
|
10
10
|
class fTOPSIS(BaseFuzzyMethod):
|
|
11
11
|
"""
|
|
@@ -144,9 +144,7 @@ class fTOPSIS(BaseFuzzyMethod):
|
|
|
144
144
|
If any computational stage fails.
|
|
145
145
|
"""
|
|
146
146
|
|
|
147
|
-
# -----------------------------
|
|
148
147
|
# Normalization
|
|
149
|
-
# -----------------------------
|
|
150
148
|
try:
|
|
151
149
|
nmatrix = self.normalization(matrix, types)
|
|
152
150
|
|
|
@@ -178,9 +176,20 @@ class fTOPSIS(BaseFuzzyMethod):
|
|
|
178
176
|
|
|
179
177
|
# Ideal solutions
|
|
180
178
|
try:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
if is_type_aware_normalization(self.normalization):
|
|
180
|
+
ideal = np.ones((matrix.shape[1], matrix.shape[2]))
|
|
181
|
+
nideal = np.zeros((matrix.shape[1], matrix.shape[2]))
|
|
182
|
+
else:
|
|
183
|
+
ideal = np.empty((matrix.shape[1], 3))
|
|
184
|
+
nideal = np.empty((matrix.shape[1], 3))
|
|
185
|
+
|
|
186
|
+
for j in range(matrix.shape[1]):
|
|
187
|
+
if types[j] == 1: # benefit
|
|
188
|
+
ideal[j] = np.max(wmatrix[:, j], axis=0)
|
|
189
|
+
nideal[j] = np.min(wmatrix[:, j], axis=0)
|
|
190
|
+
else: # cost
|
|
191
|
+
ideal[j] = np.min(wmatrix[:, j], axis=0)
|
|
192
|
+
nideal[j] = np.max(wmatrix[:, j], axis=0)
|
|
184
193
|
except Exception as e:
|
|
185
194
|
raise RuntimeError(f"Failed to create fuzzy ideal solutions: {e}") from e
|
|
186
195
|
|
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
|
+
from .normalizations import (
|
|
6
|
+
vector_normalization,
|
|
7
|
+
saw_normalization,
|
|
8
|
+
sqrt_normalization,
|
|
9
|
+
)
|
|
10
|
+
|
|
5
11
|
__all__ = [
|
|
6
12
|
'normalize_weights',
|
|
7
13
|
'crisp_to_tfn_weights',
|
|
8
|
-
'generate_fuzzy_matrix'
|
|
14
|
+
'generate_fuzzy_matrix',
|
|
15
|
+
'is_type_aware_normalization'
|
|
9
16
|
]
|
|
10
17
|
|
|
11
18
|
def normalize_weights(weights: np.ndarray) -> np.ndarray:
|
|
@@ -101,3 +108,20 @@ def generate_fuzzy_matrix(
|
|
|
101
108
|
|
|
102
109
|
matrix = np.random.uniform(low=lower, high=upper, size=(m, n, 3))
|
|
103
110
|
return np.array([np.sort(row, axis=1) for row in matrix])
|
|
111
|
+
|
|
112
|
+
_TYPE_AGNOSTIC_NORMALIZATIONS = {
|
|
113
|
+
vector_normalization,
|
|
114
|
+
saw_normalization,
|
|
115
|
+
sqrt_normalization,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
def is_type_aware_normalization(normalization) -> bool:
|
|
119
|
+
"""
|
|
120
|
+
Return True if the given normalization function takes criterion types
|
|
121
|
+
into account (i.e. inverts cost criteria).
|
|
122
|
+
|
|
123
|
+
Type-agnostic normalizations (vector, saw, sqrt) ignore ``types``
|
|
124
|
+
and therefore require the calling method to handle benefit/cost
|
|
125
|
+
direction when constructing ideal solutions.
|
|
126
|
+
"""
|
|
127
|
+
return normalization not in _TYPE_AGNOSTIC_NORMALIZATIONS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyfdm
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Python library for Fuzzy Decision Making based on Triangular Fuzzy Numbers
|
|
5
5
|
Home-page: https://github.com/jwieckowski/pyfdm
|
|
6
6
|
Author: Jakub Więckowski
|
|
@@ -40,7 +40,7 @@ Dynamic: requires-python
|
|
|
40
40
|
|
|
41
41
|
Python 3 package with Fuzzy Decision Making (PyFDM) methods based on Triangular Fuzzy Numbers (TFN).
|
|
42
42
|
|
|
43
|
-
**Version 1.2.
|
|
43
|
+
**Version 1.2.2** adds 6 new MCDA methods, 6 subjective weighting methods, an expert-data collection and export module, group aggregation, step-by-step intermediate result inspection, and a standalone ranking utility — on top of a refactored, more robust core architecture. See [What's new in 1.2.2](#whats-new-in-120) below.
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ Python 3 package with Fuzzy Decision Making (PyFDM) methods based on Triangular
|
|
|
49
49
|
- [Installation](#installation)
|
|
50
50
|
- [Local development setup](#local-development-setup)
|
|
51
51
|
- [Testing](#testing)
|
|
52
|
-
- [What's new in 1.2.
|
|
52
|
+
- [What's new in 1.2.2](#whats-new-in-120)
|
|
53
53
|
- [Modules and functionalities](#modules-and-functionalities)
|
|
54
54
|
- [Usage examples](#usage-examples)
|
|
55
55
|
- [Citations](#citations)
|
|
@@ -156,7 +156,7 @@ All tests are expected to pass with zero `DeprecationWarning`s on a clean checko
|
|
|
156
156
|
|
|
157
157
|
---
|
|
158
158
|
|
|
159
|
-
# What's new in 1.2.
|
|
159
|
+
# What's new in 1.2.2
|
|
160
160
|
|
|
161
161
|
### Architecture
|
|
162
162
|
|
|
@@ -8,7 +8,7 @@ with open("CHANGELOG.md", "r", encoding="utf-8") as fh:
|
|
|
8
8
|
|
|
9
9
|
setuptools.setup(
|
|
10
10
|
name="pyfdm",
|
|
11
|
-
version="1.2.
|
|
11
|
+
version="1.2.2",
|
|
12
12
|
author="Jakub Więckowski",
|
|
13
13
|
author_email="j.wieckowski@il-pib.pl",
|
|
14
14
|
description="Python library for Fuzzy Decision Making based on Triangular Fuzzy Numbers",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|