Skip to main content

ISTOP

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) implementation in python

Please checkout this link to see more details about TOPSIS steps.

Install

You can install the latest release,

$ pip install istop

Usage

>>> import numpy as np
>>> from istop import Topsis

>>> evaluation_matrix = np.array([
...     [1, 2, 3, 4],
...     [4, 3, 2, 1],
...     [3, 3, 3, 3],
...     [4, 4, 4, 4],
...     [1, 2, 4, 4]
... ])
>>> criteria = [False, True, True, True]
>>> weights = [5, 5, 9, 0]

>>> topsis = Topsis(
...     matrix=evaluation_matrix,
...     criteria=criteria,
...     weights=weights
... )
>>> result = topsis.calculate()
>>> print(result.best_ranks)
[2, 3, 4, 1, 5]
>> print(result.worst_similarities)
[0.56842726 0.18322884 0.43760627 0.55861195 0.68474356]

>>> print(result)
best_ranks=[2, 3, 4, 1, 5]
best_similarities=[0.43157274 0.81677116 0.56239373 0.44138805 0.31525644]
worst_ranks=[2, 3, 4, 1, 5]
worst_similarities=[0.56842726 0.18322884 0.43760627 0.55861195 0.68474356]

The weights parameter is optional. If you don't send it, the default value for each attribute will be 1.

Contribution

Please check to the pylint and flake8 steps in workflow before contribution.

Metadata

Release files for istop 0.0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for istop 0.0.1.1
File Size Uploaded Provenance Actions
istop-0.0.1.1.tar.gz 3.8 kB Without provenance Details for istop-0.0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for istop 0.0.1.1
File Interpreter ABI Platform Actions
istop-0.0.1.1-py3-none-any.whl Python 3 none any Details for istop-0.0.1.1-py3-none-any.whl

Total release size: 8.0 kB

Release files / istop-0.0.1.1.tar.gz

Download URL istop-0.0.1.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ec158d5f6ee9b967d3f3687063c8689c73fce6ce87d39fadf6c608ba1181e6f9
BLAKE2b-256 checksum
How to use checksums
07d176e0d65c8949ae4fa5fc16b148a707c651a76995291d01e37369a83e55dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / istop-0.0.1.1-py3-none-any.whl

Download URL istop-0.0.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a25cba45b5345c44b78db8700ca087dd64d2ba7cb1c0bbdcf27d021d963e6e7
BLAKE2b-256 checksum
How to use checksums
293632ac932cc40186d22e0c93f99afbdf72543881e76ff5fbf2e628be3ac84b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for istop 0.0.1.1

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.

Release history Release notifications | RSS feed

This release

0.0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page