Skip to main content

A Python package to perform TOPSIS analysis.

Project description

# TOPSIS-Sidharth-102218069

## Overview

This package implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multi-criteria decision-making. The method ranks alternatives based on their relative closeness to the ideal solution.

## Installation

You can install the package directly from PyPI using the following command:

```bash
pip install topsis-sidharth-102218069

Usage

You can use this package from the command line to calculate TOPSIS scores and rankings for a given dataset.

Command Line

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

Example

topsis 102218069-data.csv "1,1,1,2" "+,+,-,+" 102218069-result.csv

Parameters

  • <InputDataFile>: Path to the input CSV file containing the data.
  • <Weights>: Comma-separated weights for each criterion.
  • <Impacts>: Comma-separated impacts for each criterion, where each impact is either + (beneficial) or - (non-beneficial).
  • <ResultFileName>: The name of the output CSV file where the results will be saved.

Sample Input File Format

The input CSV file should have the following structure:

Fund Name P1 P2 P3 P4 P5
M1 0.84 0.71 6.7 42.1 12.59
M2 0.91 0.83 7.0 31.7 10.11
... ... ... ... ... ...

Sample Output File Format

The output CSV file will have the following structure:

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.84 0.71 6.7 42.1 12.59 0.3653 6
M2 0.91 0.83 7.0 31.7 10.11 0.2819 8
... ... ... ... ... ... ... ...

Error Handling

The program will raise an error and terminate if:

  • The input file is not found.
  • The number of weights and impacts does not match the number of criteria.
  • Impacts contain values other than + or -.
  • Weights are not numeric.

Dependencies

  • pandas
  • numpy

These dependencies are automatically installed when you install the package.

Author

Sidharth Dhawan

License

This project is licensed under the 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_sidharth_102218069-0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

topsis_sidharth_102218069-0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file topsis_sidharth_102218069-0.2.tar.gz.

File metadata

File hashes

Hashes for topsis_sidharth_102218069-0.2.tar.gz
Algorithm Hash digest
SHA256 85f237379b7c97fb0de40978e27114bc3f945d038b7dfe3423959f02f832201c
MD5 2d10d4ddd707abc3b3e99ef5f268f42c
BLAKE2b-256 f3f26bffce17e43307b2e67c2aa6b831b4f4e6c8e53008e429f49b580e61fddc

See more details on using hashes here.

File details

Details for the file topsis_sidharth_102218069-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_sidharth_102218069-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e77031e1ee4b3bfabab6a4330e6a5853718d18c2d7096d00054cecc94093323
MD5 84188711ccc8073fbbe0e2f7fa58fe54
BLAKE2b-256 ca9a9505a3e663d4a046d39eeb6aced3593fa17331eeacb31ae6daf7496b0c22

See more details on using hashes here.

Supported by

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