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.0.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.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_samiksha_102317096-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d23580adc0cf46476cd26bb1c2ccf14284428de2dc6d7edeb14102a8c7f2c798
MD5 48a95ada6e7852053ed771e32d0fb83d
BLAKE2b-256 c70b400a1592a2b85a5d366b5dfaf204a23b59d3f4a9f4e79c0c2e1d936ad493

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_samiksha_102317096-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b2a052bc7643135360c75d34edd2a2d63aa797b2261c4716455d5df19f0a68a
MD5 6a4d8d40ff31afa8867fae702844b076
BLAKE2b-256 668a0ff9f3f308a4001f4bb4b1abb143211a50535196069b5d7c1c3d3148e9b5

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