Skip to main content

A Python package for TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution)

Project description

Topsis-Aryan-102316004

PyPI version License: MIT

Project on PyPI: https://pypi.org/project/Topsis-Aryan-102316004/

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


📋 Table of Contents


📦 Installation

You can install the package directly from PyPI:

pip install Topsis-Aryan-102316004

Part 1: Command Line Usage

You can use the topsis command directly in your terminal to process CSV files.

Syntax

topsis <InputDataFile> <Weights> <Impacts> <OutputResultFileName>

Parameters

  1. InputDataFile: Path to the input CSV file. Must contain numeric data from the 2nd column onwards.
  2. Weights: Comma-separated weights (e.g., 1,1,1,1).
  3. Impacts: Comma-separated impacts (+ for beneficial, - for non-beneficial).
  4. OutputResultFileName: Name of the output CSV file to save results.

Example

topsis data.csv "1,1,1,1,1" "+,+,+,+,+" result.csv

Part 2: Library Usage

You can import the package in your Python scripts.

from topsis.main import topsis_logic
import pandas as pd

# Load your dataset
df = pd.read_csv("data.csv")

# processing...
# ...

Part 3: Web Service

A user-friendly web interface is provided to use the TOPSIS method without writing code.

Features

  • Upload CSV: Easily upload your input file.
  • Custom Parameters: Enter weights and impacts.
  • Email Results: Get the resultant CSV file directly in your inbox.
  • Interactive Table: View the results (Topsis Score and Rank) instantly.

Running the Web App

Ensure you have streamlit installed (pip install streamlit).

streamlit run app.py

Screenshot

Web Service Interface

Note: Provide your sender Gmail and App Password in the sidebar to enable email functionality.


� Sample Data

Input Data (data.csv)

Fund Name P1 P2 P3 P4 P5
M1 0.67 0.45 6.5 42.6 12.56
M2 0.6 0.36 3.6 53.3 14.47
M3 0.82 0.67 3.8 63.1 17.1
M4 0.6 0.36 3.5 69.2 18.42
M5 0.76 0.58 4.8 43 12.29
M6 0.69 0.48 6.6 48.7 14.12
M7 0.79 0.62 4.8 59.2 16.35
M8 0.84 0.71 6.5 34.5 10.64

Output Result (result.csv)

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.67 0.45 6.5 42.6 12.56 0.4354 6
M2 0.6 0.36 3.6 53.3 14.47 0.3038 8
M3 0.82 0.67 3.8 63.1 17.1 0.6269 2
M4 0.6 0.36 3.5 69.2 18.42 0.4730 5
M5 0.76 0.58 4.8 43.0 12.29 0.4177 7
M6 0.69 0.48 6.6 48.7 14.12 0.5234 4
M7 0.79 0.62 4.8 59.2 16.35 0.6514 1
M8 0.84 0.71 6.5 34.5 10.64 0.5237 3

�📄 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_aryan_102316004-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

topsis_aryan_102316004-1.0.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file topsis_aryan_102316004-1.0.0.tar.gz.

File metadata

  • Download URL: topsis_aryan_102316004-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for topsis_aryan_102316004-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1f88797969ef24749a4377de44174a9ca1409eb4d81c81bebdc10c4649e13984
MD5 166be9f3893466c33dc7daa37f9c156e
BLAKE2b-256 058b1ee1f8acd8ff95ac6a7027a41d3a0cef613426c8886ef4cf2249dc46aa31

See more details on using hashes here.

File details

Details for the file topsis_aryan_102316004-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_aryan_102316004-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e652f4237be77af5c1ebb448b99cbf489e3b23c885aedc2370f8a09d5c47bc8f
MD5 67720d26f47e821e6644e28b9b4f0624
BLAKE2b-256 978625807883b8dc7ad131864d89d8dfa2d65b4770ff05f690c8ceba77ea6962

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