Skip to main content

TOPSIS implementation as a Python package

Project description

TOPSIS Python Package

This package implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method for solving Multi-Criteria Decision Making (MCDM) problems.


📦 Installation

pip install Topsis-Saniya-102303183

🚀 Usage

Run the package using the command line as follows:

topsis <InputDataFile.csv> <Weights> <Impacts> <ResultFile.csv>

📌 Parameters

  • InputDataFile.csv
    CSV file containing alternatives and criteria values.

  • Weights
    Comma-separated numerical weights
    Example: 1,1,1,1

  • Impacts
    Comma-separated impacts
    + for benefit, - for cost
    Example: +,-,+,+

  • ResultFile.csv
    Output CSV file with TOPSIS score and rank.


📄 Example

Sample Input File (sample.csv)

Model,Storage,Camera,Price,Looks
M1,16,12,250,5
M2,16,8,200,3
M3,32,16,300,4
M4,32,8,275,4
M5,16,16,225,2

Command

topsis sample.csv "1,1,1,1" "+,-,+,+" result.csv

📊 Output

The output CSV file will contain:

  • Topsis Score
  • Rank

Higher score indicates a better alternative.


⚠️ Assumptions

  • Input file must be a CSV file
  • All values must be numeric
  • Number of weights must equal number of criteria
  • Impacts must be either + or -
  • No missing values allowed

👩‍💻 Author

Saniya


📜 License

MIT License

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

topsis_saniya_102303183-1.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topsis_saniya_102303183-1.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file topsis_saniya_102303183-1.0.1.tar.gz.

File metadata

  • Download URL: topsis_saniya_102303183-1.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for topsis_saniya_102303183-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f3b3e32f247679b2c86af7de5d18f6924489136084d0251a74631c10b9bb9af1
MD5 12a65c13409f7cb4f86412fc4317e835
BLAKE2b-256 6cd9eb2a6fc44e2ac3469578e31658c4bf299c426b76918717de8704104f1e24

See more details on using hashes here.

File details

Details for the file topsis_saniya_102303183-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_saniya_102303183-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abe7b744f88299c999a080e607a55200d5a84f5526584f6e49ec83737a6e4bc2
MD5 7e539d85331767ac8ccfa41487d34d46
BLAKE2b-256 bbaf3aee0cf386057f53b28f924337d84de92a123af1cb433d2a855da10a99cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page