# Project Description
## Topsis
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a Multi-Criteria Decision Ananlysis (MCDA) method that is used to solve multiple criteria decision making problems.
It uses the fundamental premise that the best solution has the shortest distance from the positive-ideal solution, and the longest distance from the negative-ideal one and ranks solutions that have multiple criterias.
## Installation
Use ```pip``` to install:
```
pip install topsis-ananya-102017024
```
**Prerequisite**
Libraries needed to be downloaded before running this package are :
- Numpy
- Pandas
## Usage
Run ```topsis``` in the input file's directory as follows:
```
topsis <input_file_name> <weights> <impacts> <output_file_name>
```
For example,
Use quotation marks while including spaces in any argument:
```
topsis data.csv "1, 1, 1, 1" "+, -, +, -" result.csv
```
or vectors can be entered without any space
```
topsis data.csv 1,1,1,1 +,-,+,- result.csv
```
##### Note that
- Input file must contain three or more columns.
- Except the first column of the input file the rest must be numeric
- Weights must be numeric
- Impacts must be either
- ```+``` (for features that are to be maximised)
- ```-``` (for features that are to be minimized)
- Both Impacts & Weights must be seperated by a comma ```,```
## Example
**input.csv**
| Attribute | Price | Storage | Camera | Looks|
| ------ | ------ | ------ | ------ | ------ |
| M1 | 250 | 16 | 12 | 5 |
| M2 | 200 | 16 | 8 | 3 |
| M3 | 300 | 32 | 16 | 4 |
| M4 | 275 | 32 | 8 | 4 |
| M5 | 225 | 16 | 16 | 2 |
On running the following command
```
topsis input.csv "0.25,0.25,0.25,0.25" "-,+,+,+" output.csv
```
**output.csv**
| Attribute | Price | Storage | Camera | Looks| Topsis Score | Rank |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| M1 | 250 | 16 | 12 | 5 | 0.534269 | 3 |
| M2 | 200 | 16 | 8 | 3 | 0.308314 | 5 |
| M3 | 300 | 32 | 16 | 4 | 0.691686 | 1 |
| M4 | 275 | 32 | 8 | 4 | 0.534807 | 2 |
| M5 | 225 | 16 | 16 | 2 | 0.401222 | 4 |
## License
MIT
Raw data
{
"_id": null,
"home_page": "",
"name": "topsis-Ananya-102017024",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "python,TOPSIS,MCDA,MCDM,predictive analytics,statistics",
"author": "Ananya Thomas",
"author_email": "ananyathomas10@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/46/a7/da1ab2041c27293f2ee3e187988cc3cfdfc6cccac3c7beaff33a7f895448/topsis-Ananya-102017024-1.0.0.tar.gz",
"platform": null,
"description": "# Project Description\n## Topsis\n\nTOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a Multi-Criteria Decision Ananlysis (MCDA) method that is used to solve multiple criteria decision making problems.\n\nIt uses the fundamental premise that the best solution has the shortest distance from the positive-ideal solution, and the longest distance from the negative-ideal one and ranks solutions that have multiple criterias.\n\n## Installation\nUse ```pip``` to install:\n```\npip install topsis-ananya-102017024\n```\n**Prerequisite**\nLibraries needed to be downloaded before running this package are :\n- Numpy\n- Pandas\n\n## Usage\nRun ```topsis``` in the input file's directory as follows:\n```\ntopsis <input_file_name> <weights> <impacts> <output_file_name>\n```\nFor example,\nUse quotation marks while including spaces in any argument:\n```\ntopsis data.csv \"1, 1, 1, 1\" \"+, -, +, -\" result.csv\n```\nor vectors can be entered without any space\n```\ntopsis data.csv 1,1,1,1 +,-,+,- result.csv\n```\n\n##### Note that\n- Input file must contain three or more columns.\n- Except the first column of the input file the rest must be numeric\n- Weights must be numeric\n- Impacts must be either \n - ```+``` (for features that are to be maximised) \n - ```-``` (for features that are to be minimized)\n- Both Impacts & Weights must be seperated by a comma ```,``` \n\n## Example\n**input.csv**\n| Attribute | Price | Storage | Camera | Looks|\n| ------ | ------ | ------ | ------ | ------ |\n| M1 | 250 | 16 | 12 | 5 |\n| M2 | 200 | 16 | 8 | 3 |\n| M3 | 300 | 32 | 16 | 4 |\n| M4 | 275 | 32 | 8 | 4 |\n| M5 | 225 | 16 | 16 | 2 |\n\nOn running the following command\n``` \ntopsis input.csv \"0.25,0.25,0.25,0.25\" \"-,+,+,+\" output.csv\n```\n\n**output.csv**\n| Attribute | Price | Storage | Camera | Looks| Topsis Score | Rank |\n| ------ | ------ | ------ | ------ | ------ | ------ | ------ |\n| M1 | 250 | 16 | 12 | 5 | 0.534269 | 3 |\n| M2 | 200 | 16 | 8 | 3 | 0.308314 | 5 |\n| M3 | 300 | 32 | 16 | 4 | 0.691686 | 1 |\n| M4 | 275 | 32 | 8 | 4 | 0.534807 | 2 |\n| M5 | 225 | 16 | 16 | 2 | 0.401222 | 4 |\n\n\n## License\n\nMIT\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "This program uses command line arguments to implement Topsis : a Multi-Criteria Decision Ananlysis (MCDA) method",
"version": "1.0.0",
"split_keywords": [
"python",
"topsis",
"mcda",
"mcdm",
"predictive analytics",
"statistics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "46a7da1ab2041c27293f2ee3e187988cc3cfdfc6cccac3c7beaff33a7f895448",
"md5": "7fae0ab290fb3ac735e1224074efb03d",
"sha256": "d8862b0c651cf335169254e05a27ae7adae20dec913e30d2b11205c894ef3096"
},
"downloads": -1,
"filename": "topsis-Ananya-102017024-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "7fae0ab290fb3ac735e1224074efb03d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 4525,
"upload_time": "2023-01-21T12:43:36",
"upload_time_iso_8601": "2023-01-21T12:43:36.990535Z",
"url": "https://files.pythonhosted.org/packages/46/a7/da1ab2041c27293f2ee3e187988cc3cfdfc6cccac3c7beaff33a7f895448/topsis-Ananya-102017024-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-21 12:43:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "topsis-ananya-102017024"
}