Skip to main content

A Python package for TOPSIS analysis

Project description

Topsis-Samiksha-102317096

A Python package implementing TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) for multi-criteria decision analysis.

What is TOPSIS?

TOPSIS is a multi-criteria decision analysis method that identifies the best alternative based on the shortest distance from the ideal solution and the farthest distance from the negative-ideal solution.

Installation

pip install Topsis-Samiksha-102317096

Usage

Command Line

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Example

topsis input.csv "1,1,1,2" "+,+,-,+" result.csv

Python Script

from topsis_samiksha_102317096 import apply_topsis, validate_input
import pandas as pd

# Your implementation here

Input File Format

  • CSV file with 3 or more columns
  • First column: Object/Variable names (e.g., M1, M2, M3...)
  • Remaining columns: Numeric values only

Example:

Model,Price,Storage,Camera,Looks
M1,250,16,12,5
M2,200,16,8,3
M3,300,32,16,4

Parameters

  • Weights: Comma-separated numbers (e.g., "1,1,1,2")
  • Impacts: Comma-separated +/- signs (e.g., "+,+,-,+")
    • + : Benefit criterion (higher is better)
    • - : Cost criterion (lower is better)

Output

The result file contains all input columns plus:

  • Topsis Score: Calculated score for each alternative
  • Rank: Ranking based on Topsis score

Error Handling

The package handles:

  • File not found errors
  • Invalid number of parameters
  • Non-numeric values in data columns
  • Mismatched weights/impacts count
  • Invalid impact values

Author

Samiksha
Roll Number: 102317096

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_samiksha_102317096-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

topsis_samiksha_102317096-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file topsis_samiksha_102317096-0.1.1.tar.gz.

File metadata

File hashes

Hashes for topsis_samiksha_102317096-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff1e6638d245dc30bd29def29a7dd06718a1e55506306747b2741b2249b6af97
MD5 0fc743326ca8b0ab6982dc533c86c7c7
BLAKE2b-256 99cd0831611ec6146dd85111a3b90537cb457941474d4b8b39c36bd6bb49bced

See more details on using hashes here.

File details

Details for the file topsis_samiksha_102317096-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_samiksha_102317096-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4903d750cd2a26e45533ac37c5f97393636e08926a78f6678fada50aed30997f
MD5 7aff93022b04702dc300480723f7ceb1
BLAKE2b-256 489ebfe58b9baef42bb2fd09e4aa1780c46d0811b708308f6b8e6d29e39224f0

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