# Topsis_102017182
# Topsis
# Technique for Order Preference by Similarity to Ideal Solution (TOPSIS)
In a general sense, it is the aspiration of human being to make "calculated" decision in a position of
multiple selection. In scientific terms, it is the intention to develop analytical and numerical methods that take into
account multiple alternatives with multiple criteria.
TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is one of the numerical
methods of the multi-criteria decision making
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install the package
```
pip install Topsis_102017182_sandhya_goyal
```
## Import
```
from Topsis_102017182_sandhya_goyal import topsis
```
## Usage
topsis module has a function names get_score which takes 3 arguements as:
1. dataframe - It is a pandas dataframe which has atleast 3 columns(including the first column with names). It should only have numerical values. Any non-numerical value should be encoded before passing it to function.
2. weights - It is a string of comma(,) separated numbers which tell the weight of each criteria.
3. impacts - It is a string of comma(,) separated + and - sign showing the impact of criteria on decision making.
The function return the original pandas dataframe with 2 more columns added, which are Topsis Score and Rank.
```
topsis.get_score(dataframe,weights,impacts)
```
## Example
data.csv (Input):
|contestent|sur|tal|lah|pitch|sharpness|
|------|---|----|-------|-------|-----|
|a|4|18|6.5|35|15|
|b|6|14|4|38|19|
|c|6|12|5|42|20|
|d|8|26|7|50|25|
|e|3|14|6|40|14|
```
import pandas as pd
df = pd.read_csv('data.csv')
weights = "+,+,+,+,+"
impacts = "1,1,1,1,1"
print(topsis.get_score(df,weights,impacts))
```
Output:
|contestent|sur|tal|lah|pitch|sharpness|output|
|--|------|----|--------|--------|-------|-------|
|a|4|18|6.5|35|15|3|
|b|6|14|4|38|19|4|
|c|6|12|5|42|20|2|
|d|8|26|7|50|25|1|
|e|3|14|6|40|14|5|
Raw data
{
"_id": null,
"home_page": "https://github.com/sandhya-goyal/Topsis_102017182.git",
"name": "Topsis-102017182-sandhya-goyal",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "TOPSIS,MCDM,DECISION,MAKING",
"author": "Sandhya Goyal",
"author_email": "sandhyagoyal2002@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/26/76/8fca0427b6b9dd15ab48511b6d939b63da45ccc847b3a39bd3da2707cb69/Topsis_102017182_sandhya_goyal-1.0.0.tar.gz",
"platform": null,
"description": "# Topsis_102017182\n\n# Topsis\n# Technique for Order Preference by Similarity to Ideal Solution (TOPSIS)\nIn a general sense, it is the aspiration of human being to make \"calculated\" decision in a position of\nmultiple selection. In scientific terms, it is the intention to develop analytical and numerical methods that take into\naccount multiple alternatives with multiple criteria.\nTOPSIS (Technique for Order Preference by Similarity to Ideal Solution) is one of the numerical\nmethods of the multi-criteria decision making\n\n\n## Installation\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install the package\n```\npip install Topsis_102017182_sandhya_goyal\n```\n\n\n## Import\n\n```\nfrom Topsis_102017182_sandhya_goyal import topsis\n```\n\n## Usage\ntopsis module has a function names get_score which takes 3 arguements as:\n1. dataframe - It is a pandas dataframe which has atleast 3 columns(including the first column with names). It should only have numerical values. Any non-numerical value should be encoded before passing it to function.\n2. weights - It is a string of comma(,) separated numbers which tell the weight of each criteria.\n3. impacts - It is a string of comma(,) separated + and - sign showing the impact of criteria on decision making.\n\nThe function return the original pandas dataframe with 2 more columns added, which are Topsis Score and Rank.\n```\ntopsis.get_score(dataframe,weights,impacts)\n```\n\n\n## Example\n\ndata.csv (Input):\n\n|contestent|sur|tal|lah|pitch|sharpness|\n|------|---|----|-------|-------|-----|\n|a|4|18|6.5|35|15|\n|b|6|14|4|38|19|\n|c|6|12|5|42|20|\n|d|8|26|7|50|25|\n|e|3|14|6|40|14|\n\n\n```\nimport pandas as pd\ndf = pd.read_csv('data.csv')\nweights = \"+,+,+,+,+\"\nimpacts = \"1,1,1,1,1\"\nprint(topsis.get_score(df,weights,impacts))\n```\n\nOutput:\n\n|contestent|sur|tal|lah|pitch|sharpness|output|\n|--|------|----|--------|--------|-------|-------|\n|a|4|18|6.5|35|15|3|\n|b|6|14|4|38|19|4|\n|c|6|12|5|42|20|2|\n|d|8|26|7|50|25|1|\n|e|3|14|6|40|14|5|\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "This package performs the topsis(multiple criterion decision making) on a pandas dataframe and return the rank and topsis score.",
"version": "1.0.0",
"split_keywords": [
"topsis",
"mcdm",
"decision",
"making"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b5d1893b90cdc713a666f62e231be9a25985844616f2c694eb1a0eeb0cead682",
"md5": "49d8fa72579a6b78e56ed859597e918d",
"sha256": "c39536d35d9e9e4e1e5a564b9b49994947264ba3aefadb86a046b6a1f790da5f"
},
"downloads": -1,
"filename": "Topsis_102017182_sandhya_goyal-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "49d8fa72579a6b78e56ed859597e918d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4599,
"upload_time": "2023-01-21T18:45:29",
"upload_time_iso_8601": "2023-01-21T18:45:29.382965Z",
"url": "https://files.pythonhosted.org/packages/b5/d1/893b90cdc713a666f62e231be9a25985844616f2c694eb1a0eeb0cead682/Topsis_102017182_sandhya_goyal-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "26768fca0427b6b9dd15ab48511b6d939b63da45ccc847b3a39bd3da2707cb69",
"md5": "9268fbe3b9bb42c50b0ddc88d6e0d681",
"sha256": "cbde21432ce8531664c18d56a4efa6ee5acd9c6a10589a7d9ce6f54495abb78a"
},
"downloads": -1,
"filename": "Topsis_102017182_sandhya_goyal-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "9268fbe3b9bb42c50b0ddc88d6e0d681",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4421,
"upload_time": "2023-01-21T18:45:31",
"upload_time_iso_8601": "2023-01-21T18:45:31.751748Z",
"url": "https://files.pythonhosted.org/packages/26/76/8fca0427b6b9dd15ab48511b6d939b63da45ccc847b3a39bd3da2707cb69/Topsis_102017182_sandhya_goyal-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-21 18:45:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "sandhya-goyal",
"github_project": "Topsis_102017182.git",
"lcname": "topsis-102017182-sandhya-goyal"
}