TOPSIS implementation
Project description
TOPSIS Python Package 📌 About TOPSIS
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is a multi-criteria decision-making (MCDM) method. It helps in ranking alternatives based on their distance from the ideal best and ideal worst solutions.
This package provides a command-line implementation of TOPSIS in Python.
📦 Installation
Install the package from PyPI using:
pip install Topsis-Ravish-102303651
🚀 Usage
The package can be used directly from the command line.
🔹 Command Format topsis
🔹 Example topsis data.csv "1,1,1,2" "+,+,-,+" result.csv
📄 Input File Format
The first column should contain the names of alternatives.
From second column to last column, values must be numeric.
The file must contain at least 3 columns.
✔ Example Input (data.csv) Fund Name,P1,P2,P3,P4 M1,0.67,0.45,6.5,42.6 M2,0.6,0.36,3.6,53.3 M3,0.82,0.67,3.8,63.1 M4,0.6,0.36,3.5,69.2
📤 Output File Format
The output file will contain two additional columns:
Topsis Score
Rank
✔ Example Output (result.csv) Fund Name,P1,P2,P3,P4,Topsis Score,Rank M1,0.67,0.45,6.5,42.6,0.61,2 M2,0.6,0.36,3.6,53.3,0.42,4 M3,0.82,0.67,3.8,63.1,0.78,1 M4,0.6,0.36,3.5,69.2,0.35,5
⚠️ Error Handling
The program checks for the following errors:
Incorrect number of command-line arguments
Input file not found
Less than 3 columns in input file
Non-numeric values in criteria columns
Number of weights, impacts, and criteria mismatch
Impacts other than + or -
Weights and impacts not separated by commas
Appropriate error messages are displayed for invalid inputs.
🛠 Requirements
Python 3.x
pandas
numpy
👨💻 Author
Name: Ravish Roll Number: 102303651 Course: B.Tech (Computer Engineering)
📄 License
This project is licensed under the MIT License.
License
MIT License
Copyright (c) 2026 Ravish sharma
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topsis_ravish_102303651-0.0.2.tar.gz.
File metadata
- Download URL: topsis_ravish_102303651-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df20ed852888a829f4466210e405c7e7767c7520e6d42dbaa83561c7449344ee
|
|
| MD5 |
c3526ff429e36b5c61414426940a92f4
|
|
| BLAKE2b-256 |
8256c7c43b1df3f823a5e6db4dff6b6adc6df9efc8498fe1f0793489f8e4b64a
|
File details
Details for the file topsis_ravish_102303651-0.0.2-py3-none-any.whl.
File metadata
- Download URL: topsis_ravish_102303651-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47d31c6be02c1b0ca0de78c93d66cf94019b9ee5fe7133147ac1625fd93ea880
|
|
| MD5 |
8a8768dfdddf7215595931b0ebed433a
|
|
| BLAKE2b-256 |
280b11b726db4a3a3bff8eb946349d717ab99f081dc2f904ee1721dc748ddcfb
|