Unweighted VIKOR method
The Unweighted VIKOR method (UW-VIKOR) is a multiple-criteria decision-making (MCDM) technique for ranking alternatives based on the classical VIKOR (VIseKriterijumska Optimizacija I Kompromisno Resenje) approach, however this method does not require the introduction of a priori weighting scheme. Instead, the decision-maker only has to determine the bounds ${(l_j,u_j)}_{j=1}^{M}$ between which the weights vary, thus reducing the demands on the algorithm.
As a consequence, the weights are considered decision variables in a non-linear mathematical optimization problem that considers the VIKOR $Q$-score as the objective function. The optimization yields two scores subjected to maximize ($Q_{i}^{L}$) and minimize ($Q_{i}^{U}$) the $Q$-score per each alternative as well as the optimal weights attached to them ($W_{i}^{L}$ and $W_{i}^{U}$). Then, per each alternative, we get the score intervals $[S_{i}^{L}$, $S_{i}^{U}]$ and $[R_{i}^{L}, R_{i}^{U}]$ by evaluating them with the optimal weights. Finally, we can rank alternatives using an aggregation function of the $[Q_{i}^{L}, Q_{i}^{U}]$ scores.
Installation
You can install the uwVIKOR library from GitHub:
git clone https://github.com/Aaron-AALG/uwVIKOR.git python3 -m pip install -e uwVIKOR
You can also install it directly from PyPI:
pip install uwVIKOR
Input parameters and Output
Input
data: dataframe which contains the alternatives and the criteria.
directions: array with the optimal direction of the criteria.
L: array with the lower bounds of the weights.
U: array with the upper bounds of the weights.
v: value of the utility parameter (By default v = 0.5).
w0: array with the initial guess of the weights (By default w0 = []).
display: logical argument to indicate whether to show print convergence messages or not (By default display = False).
Output
Dictionary which contains three keys:
Ranking: List with $S$, $R$ and $Q$ scores in regard to the optimal weights.
Weights_min: List with the weights that minimize the $Q$ score.
Weights_max: List with the weights that maximize the $Q$ score.
Example
The uwVIKOR function is implemented in order to manage decision matrices as input data which will be converted to NumPy arrays. Here is an example in which three alternatives and four criteria are used:
import pandas as pd
import numpy as np
from uwVIKOR.uwVIKOR import *
data = pd.DataFrame({"c1":[173, 176, 142],
"c2":[10, 11, 5],
"c3":[11.4, 12.3, 8.2],
"c4":[10.01, 10.48, 7.3]})
directions = ["max", "max", "min", "min"]
L = np.array([0.1 for _ in range(data.shape[1])])
U = np.array([0.4 for _ in range(data.shape[1])])
v = 0.75
x = uwVIKOR(data, directions, L, U, v)
Generalization to classic VIKOR
Given that uwVIKOR generalizes VIKOR, we can also compute it by limiting the amplitude of the boundaries. For this function, it is recommended to use the Numpy numerical epsilon as the difference between $L$ and $U$. Here is an example:
weights = np.array([0.25, 0.2, 0.2, 0.35])
epsilon = np.finfo(float).eps
try:
x = uwVIKOR(data,
directions,
weights,
weights + epsilon,
)
except:
x = uwVIKOR(data,
directions,
weights - epsilon,
weights,
)
Optimization in Python
This library uses the minimize function of the scipy.optimize module to carry out the optimization problems. In particular, Q_L and Q_U are obtained one by one, thus we can apply the SLSQP method.
Metadata
Release files for uwVIKOR 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uwVIKOR-1.0.0.tar.gz | 5.6 kB | Without provenance | Details for uwVIKOR-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uwVIKOR-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for uwVIKOR-1.0.0-py3-none-any.whl |
Total release size: 11.4 kB
Release files / uwVIKOR-1.0.0.tar.gz
| Download URL | uwVIKOR-1.0.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41cfaace86867ae14e23917a6c62a3b76f5fa8974fb09de823623d75d48340dc
|
|
BLAKE2b-256 checksum How to use checksums |
3661ce4f91314d1e37c97092f5edf14e3be252bfd6de11936795c37835008ce7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / uwVIKOR-1.0.0-py3-none-any.whl
| Download URL | uwVIKOR-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e634fd50c1e6dec952db5405780a713f58ceab73313daf6e80cad77205aa3c02
|
|
BLAKE2b-256 checksum How to use checksums |
cde30a8d5af5dd81cc69ccbb834b3ed2e66c3e5d8315265d6823dc09097c3d98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for uwVIKOR 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.