Skip to main content

A Python package for TOPSIS implementation

Project description

🧠 TOPSIS Python Package by Danish Sharma 🚀

Welcome to the Topsis102203633Danishsharma package! 🐍 This Python package allows you to easily perform TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) analysis, a popular method in Multi-Criteria Decision Analysis (MCDA) to rank and evaluate alternatives based on multiple criteria.

📦 Installation

You can install the package via pip:

pip install topsis102203633Danishsharma

Alternatively, you can clone this repository and use it locally:

git clone https://github.com/Danish2op/voice-controlled-topsis-package.git
cd voice-controlled-topsis-package
python setup.py install

🎯 Features

  • TOPSIS Analysis: Perform the TOPSIS algorithm on your dataset.
  • Handling Missing Data: Fill missing values using various strategies like mean, median, mode, etc.
  • Voice Commands: Use voice commands to run analysis, plot graphs, and more. 🎤
  • Flexible: Supports different distance metrics and criteria impacts.
  • Easy to Use: The interface is simple and intuitive for both beginners and experts. 😎

📂 Package Structure

Here’s an overview of the important parts of the package:

topsis102203633Danishsharma/
├── topsis102203633Danishsharma_core/
│   ├── __init__.py
│   ├── topsis.py
│   
├── README.md
├── setup.py
├── LICENSE
├── MANIFEST.in



🚀 Usage

Here’s a quick guide to using the Topsis class, including all available options.

🧑‍💻 Step 1: Import the package

from topsis102203633Danishsharma_core.topsis import Topsis, fill_missing_data, VoiceControl
import pandas as pd

# Load your dataset
df = pd.read_csv('path/to/your/data.csv')

# Set weights and impacts
weights = [0.3, 0.2, 0.2, 0.1, 0.2] 
impacts = ['+', '-', '+', '-', '+']
#Or you can load a file too like data set

🧑‍💻 Step 2: Create the TOPSIS Object

topsis = Topsis(df, weights, impacts, distance_metric='euclidean', missing_data_strategy='mean', show_para=True, reverse_rank=False)
  • distance_metric: Choose from 'euclidean', 'manhattan', 'chebyshev', 'minkowski', or 'cosine'.
  • missing_data_strategy: Choose from 'mean', 'median', 'mode', 'ffill', 'bfill', 'interpolate_linear', or 'interpolate_polynomial'.
  • show_para: Set to True to display the full results including all parameters.

🧑‍💻 Step 3: Run the TOPSIS Calculation

result = topsis.calculate()
print(result)

This will give you the alternatives ranked according to the TOPSIS methodology.

🧑‍💻 Step 4: Plot the Results (Optional)

topsis.plot_graph(result)

This will plot a bar graph with the alternatives and their respective TOPSIS scores.


🎤 Voice-Controlled Commands

You can also use voice commands to control the package.

Available Commands:

  • "start": Start the TOPSIS analysis.
  • "fill missing": Fill missing data in the dataset.
  • "graph": Plot the graph of results.
  • "exit": Exit the application.
  • "help": Show the list of available commands.

Example usage:

voice_control = VoiceControl(df, weights, impacts)
voice_control.run()  # Start listening for commands

💡 Default Parameters and Options

Here are the default parameters that you can use:

  • Distance Metric: 'euclidean'
  • Missing Data Strategy: 'mean'
  • Show Parameters: False
  • Reverse Rank: False the alternative with maximum topsis score is on top.

🔧 Advanced Configuration

You can configure additional parameters to fit your needs:

  • weights: A list of weights for each criterion.
  • impacts: A list of impacts for each criterion, where '+' indicates a positive impact, and '-' indicates a negative impact.

📑 Example with Voice Command

Here’s how you can use voice commands to perform actions like running TOPSIS analysis and plotting results.

from topsis102203633Danishsharma_core.topsis import VoiceControl
voice_control = VoiceControl(df, weights, impacts)
voice_control.run()  # Start listening for commands

🤝 Contributing

We welcome contributions! If you'd like to contribute to this project, please feel free to submit a pull request or open an issue.


🧑‍💻 License

This project is licensed under the MIT License.


For more information, please visit our GitHub Repository.

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

topsis102203633Danishsharma-1.0.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

topsis102203633Danishsharma-1.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file topsis102203633Danishsharma-1.0.1.tar.gz.

File metadata

File hashes

Hashes for topsis102203633Danishsharma-1.0.1.tar.gz
Algorithm Hash digest
SHA256 90cce6b0a4903a442a91d538449cd95378929ba570d3641cfba1e24a91387e13
MD5 6c2c6161239097a3c11be71725496159
BLAKE2b-256 da3f0d8b891dfbdef8430f38b59d6288e5c18e3e2ae44f47bc9b34a9eb86888a

See more details on using hashes here.

File details

Details for the file topsis102203633Danishsharma-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis102203633Danishsharma-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9261d25e759ab6f215bfa4b349d517e5da4bf081daf9da27734fa23d4735b261
MD5 61be1cd8b14becc961d6841cb342c41b
BLAKE2b-256 0c1d0a11c4c3e960c9cd84f49ba57b2c2f848f3b8d9db3acaf1c8758b1ceb4da

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