Skip to main content

Topsis Package

Project description

TOPSIS Python Implementation

Introduction

This Python script performs the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) analysis on a CSV file. It calculates the TOPSIS score and ranking for each alternative based on the provided weights and impacts.

Installation

Ensure you have Python installed. You need to have the following packages installed: -pandas -numpy -os

Usage

from topsis_package import topsis_from_csv

Specify input and output file paths

input_file_path = 'input_data.csv' # Replace with your input CSV file output_file_path = 'output_data.csv' # Replace with your desired output CSV file

Specify weights and impacts

weights = [0.25, 0.25, 0.25, 0.25] # Adjust based on your criteria impacts = ['+', '+', '+', '+'] # Adjust based on your criteria

Perform TOPSIS and write results to CSV

topsis_from_csv(input_file_path, output_file_path, weights, impacts)

print(f"TOPSIS results have been written to '{output_file_path}'.")

Input Format

The input csv file should contain n columns with n-1 critera where the first column refers to the names of the attributes

Output Format

The output csv file contains the all the input columns along with two additional columns, namely, TOPSIS Score and Rank. The TOPSIS Score column contains the TOPSIS score for each alternative and the Rank column contains the rank of each alternative based on the TOPSIS score.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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-Pranav-102103438-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Pranav_102103438-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Pranav-102103438-0.1.0.tar.gz.

File metadata

  • Download URL: Topsis-Pranav-102103438-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for Topsis-Pranav-102103438-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7329e3396708d04ecbcd872e4c6fa890a8889926924dc271992922ef31419e8a
MD5 6a8b424a206a4363fe33e85507503fe1
BLAKE2b-256 36b9741df38148a3b7032c7ec571021a0bc5bc9e3eb0802350e613a49c9f4f31

See more details on using hashes here.

File details

Details for the file Topsis_Pranav_102103438-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Pranav_102103438-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36faecc0ad30e16b403b311d2ce8786c7680666e4cc0ff81694df6f9d4d8f642
MD5 137de29456935a95dc1fe85f1d8ed0e9
BLAKE2b-256 95c8924b81185c4f900b7219e8d41dd59c57b9faab10cf37def83e7efd5ca7bc

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