Observed since 20 Oct, 15:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A Python implementation of the TOPSIS method for multi-criteria decision making
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is a multi-criteria decision-making method. This Python package implements the TOPSIS method, allowing you to rank alternatives based on multiple criteria.
This implementation is specifically designed to work with a CSV input file and provides results with TOPSIS scores and ranks.
You can install this package directly from PyPI using pip:
pip install 102206172_DHRUV
After installing the package, you can use it from the command line. The basic usage is:
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
"1,1,1,2").+ or - signs indicating whether each criterion is beneficial (+) or non-beneficial (-) (e.g., "+,+,-,+").Suppose you have an input file named 102206172_data.csv with the following content:
Alternative,Criterion1,Criterion2,Criterion3,Criterion4
M1,250,16,12,5
M2,200,6,8,3
M3,300,16,8,4
M4,275,10,10,4
You can run the following command:
topsis 102206172-data.csv "1,1,1,2," "+,+,-,+," 102206172-result.csv
This will generate a file 102206172-result.csv containing the input data along with two additional columns for the TOPSIS score and the rank:
Alternative,Criterion1,Criterion2,Criterion3,Criterion4,TOPSIS Score,Rank
M1,250,16,12,5,0.556,2
M2,200,6,8,3,0.222,4
M3,300,16,8,4,0.778,1
M4,275,10,10,4,0.444,3
The program includes several checks to handle common errors:
+ or -.Here are a few examples to demonstrate how the package can be used:
topsis data.csv "1,1,1,1" "+,+,+,+" result.csv
topsis data.csv "0.5,1,1.5,2" "+,-,+,-" result.csv
If the number of weights or impacts does not match the number of criteria:
topsis data.csv "1,1,1" "+,+" result.csv
This will result in an error message indicating the mismatch.
To ensure everything works correctly, you can run some tests. If you haven't already, you can clone the repository and run the tests locally.
# Clone the repository
git clone https://github.com/Dhruvrstar/TOPSIS.git
# Navigate to the project directory
cd 102206172_DHRUV
# Install the required dependencies
pip install -r requirements.txt
# Run the tests (assuming you've created test scripts)
python -m unittest discover tests
If you'd like to contribute to this project, follow these steps:
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions, suggestions, or issues, feel free to contact me at dhruvofff@gmail.com.
### **Instructions for Customization:**
1. **PyPI Badge:** If you want to include the PyPI version badge, replace `102206172_DHRUV` in the badge URL with your actual package name.
2. **Example Commands:** Ensure that the commands and examples match your actual package usage. Replace the placeholder values with real ones.
3. **Contact Information:** Replace `your.email@example.com` with your actual contact email.
4. **Repository URL:** Update any URLs to point to your actual GitHub repository.
5. **Acknowledgments:** Customize the Acknowledgments section with any relevant names or organizations you wish to credit.
By following these steps and customizing the provided template, you'll have a thorough and professional `README.md` file ready for your project!
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 18 Jan 2025 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 15:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b096c32d35cdd030536e216fe406ae031be2a35ab7bab75e638d1212d0e27438