topsis-anshul-102303930 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.1
2
+ Name: topsis-anshul-102303930
3
+ Version: 1.0.2
4
+ Summary: A Python package for TOPSIS multi-criteria decision making
5
+ Author: Anshul Kaushal
6
+ Author-email: anshulkaushal27@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: pandas
14
+ Requires-Dist: numpy
15
+
16
+ # Topsis-Anshul-102303930
17
+
18
+ [![PyPI version](https://badge.fury.io/py/Topsis-Anshul-102303930.svg)](https://badge.fury.io/py/Topsis-Anshul-102303930)
19
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
20
+
21
+ ## 📌 Description
22
+
23
+ This package implements the **TOPSIS (Technique for Order Preference by Similarity to Ideal Solution)** method, a multi-criteria decision-making (MCDM) approach used to rank alternatives based on their distance from an ideal best and an ideal worst solution.
24
+
25
+ TOPSIS is widely used in various domains including:
26
+ - Product selection and comparison
27
+ - Supplier evaluation
28
+ - Project prioritization
29
+ - Performance assessment
30
+ - Resource allocation
31
+
32
+ ## ⚙️ Installation
33
+
34
+ Install the package using pip:
35
+
36
+ ```bash
37
+ pip install Topsis-Anshul-102303930
38
+ ```
39
+
40
+ ## 🚀 Usage
41
+
42
+ After installation, the `topsis` command becomes available in your terminal.
43
+
44
+ ### Basic Syntax
45
+
46
+ ```bash
47
+ topsis <input_csv> <weights> <impacts> <output_csv>
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ | Parameter | Description |
53
+ |-----------|-------------|
54
+ | `input_csv` | Path to the CSV file containing the decision matrix |
55
+ | `weights` | Comma-separated numerical weights for each criterion |
56
+ | `impacts` | Comma-separated impacts (`+` for benefit, `-` for cost) |
57
+ | `output_csv` | Path where the output CSV file will be saved |
58
+
59
+ ### Example Commands
60
+
61
+ With quotes:
62
+ ```bash
63
+ topsis sample.csv "1,1,1,1" "+,-,+,+" output.csv
64
+ ```
65
+
66
+ Without quotes:
67
+ ```bash
68
+ topsis sample.csv 1,1,1,1 +,-,+,+ output.csv
69
+ ```
70
+
71
+ ## 📊 Example
72
+
73
+ ### Input File (`sample.csv`)
74
+
75
+ A CSV file showing data for different mobile handsets with varying features:
76
+
77
+ ```csv
78
+ Model,Storage space(in gb),Camera(in MP),Price(in $),Looks(out of 5)
79
+ M1,16,12,250,5
80
+ M2,16,8,200,3
81
+ M3,32,16,300,4
82
+ M4,32,8,275,4
83
+ M5,16,16,225,2
84
+ ```
85
+
86
+ ### Decision Criteria
87
+
88
+ **Weights Vector:** `[0.25, 0.25, 0.25, 0.25]`
89
+
90
+ **Impacts Vector:** `[+, +, -, +]`
91
+ - Storage space: + (more is better)
92
+ - Camera: + (more is better)
93
+ - Price: - (less is better)
94
+ - Looks: + (more is better)
95
+
96
+ ### Command
97
+
98
+ ```bash
99
+ topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" output.csv
100
+ ```
101
+
102
+ ### Output
103
+
104
+ The output file will contain the original data with two additional columns:
105
+
106
+ ```
107
+ TOPSIS RESULTS
108
+ -----------------------------
109
+ Model Storage space(in gb) Camera(in MP) Price(in $) Looks(out of 5) P-Score Rank
110
+ M1 16 12 250 5 0.534277 3
111
+ M2 16 8 200 3 0.308368 5
112
+ M3 32 16 300 4 0.691632 1
113
+ M4 32 8 275 4 0.534737 2
114
+ M5 16 16 225 2 0.401046 4
115
+ ```
116
+
117
+ **Interpretation:** M3 ranks highest (Rank 1) with the best TOPSIS score of 0.691632, making it the optimal choice among the alternatives.
118
+
119
+ ## 📋 Input File Requirements
120
+
121
+ 1. **CSV Format:** The input file must be in CSV format
122
+ 2. **First Column:** Should contain the names/identifiers of alternatives
123
+ 3. **Remaining Columns:** Should contain numerical values for each criterion
124
+ 4. **No Missing Values:** All cells must have valid numerical data (except the first column)
125
+ 5. **Minimum Criteria:** At least 2 criteria columns are required
126
+
127
+ ## ⚠️ Important Notes
128
+
129
+ - The number of weights must match the number of criteria columns
130
+ - The number of impacts must match the number of criteria columns
131
+ - Weights should be positive numbers
132
+ - Impacts should be either `+` (benefit) or `-` (cost)
133
+ - All criterion values must be numeric
134
+
135
+ ## 🔧 How TOPSIS Works
136
+
137
+ 1. **Normalize** the decision matrix
138
+ 2. **Apply weights** to the normalized matrix
139
+ 3. **Identify** ideal best and ideal worst solutions
140
+ 4. **Calculate** the distance of each alternative from ideal best and ideal worst
141
+ 5. **Compute** the performance score (closeness coefficient)
142
+ 6. **Rank** alternatives based on performance scores
143
+
144
+ ## 📝 License
145
+
146
+ This project is licensed under the MIT License.
147
+
148
+ ## 👤 Author
149
+
150
+ **Anshul**
151
+ Roll Number: 102303930
152
+
153
+ ## 🤝 Contributing
154
+
155
+ Contributions, issues, and feature requests are welcome!
156
+
157
+ ## 📧 Contact
158
+
159
+ For any queries or suggestions, please feel free to reach out.
160
+
161
+ ---
162
+
163
+ **Note:** This package was created as part of an academic project for UCS654 - Prescriptive Analytics.
@@ -0,0 +1,8 @@
1
+ topsis_anshul/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ topsis_anshul/topsis.py,sha256=nxT4WXz7Z2KU17EOpviNfBPE4XdB794wSyT0seMzd_k,2556
3
+ topsis_anshul_102303930-1.0.2.dist-info/LICENSE,sha256=XFA2fzQCLy41yBxlaoLoMFCr_mFFPsUqtx58outGwfo,689
4
+ topsis_anshul_102303930-1.0.2.dist-info/METADATA,sha256=FFdqHW0b9KrAAlfkc4a3MGushY8r2vk47HQzCVsg8IY,4998
5
+ topsis_anshul_102303930-1.0.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
6
+ topsis_anshul_102303930-1.0.2.dist-info/entry_points.txt,sha256=fM1Se7TB5H5DyOFpENDatsDEMD1odgCE4QXiT38xW_g,53
7
+ topsis_anshul_102303930-1.0.2.dist-info/top_level.txt,sha256=xnQI0g8RBd7KKV__q4kvGFvD4LUGWRp_EQ3TWz5BV_w,14
8
+ topsis_anshul_102303930-1.0.2.dist-info/RECORD,,
@@ -1,97 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: topsis-anshul-102303930
3
- Version: 1.0.1
4
- Summary: A Python package for TOPSIS multi-criteria decision making
5
- Author: Anshul Kaushal
6
- Author-email: anshulkaushal27@gmail.com
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.6
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: pandas
14
- Requires-Dist: numpy
15
-
16
- \# Topsis-Anshul-102303930
17
-
18
-
19
-
20
- \## 📌 Description
21
-
22
- This package implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method.
23
-
24
- TOPSIS is a multi-criteria decision-making approach used to rank alternatives based on their distance from
25
-
26
- an ideal best and an ideal worst solution.
27
-
28
-
29
-
30
- ---
31
-
32
-
33
-
34
- \## ⚙️ Installation
35
-
36
- Install the package using pip:
37
-
38
-
39
-
40
- ```bash
41
-
42
- pip install Topsis-Anshul-102303930
43
-
44
-
45
-
46
- \## Usage
47
-
48
- \# After installation, the topsis command becomes available in the terminal.
49
- topsis <input_csv> <weights> <impacts> <output_csv>
50
-
51
- Parameters
52
- Parameter Description
53
- input_csv CSV file containing the dataset
54
- weights Comma-separated numerical weights
55
- impacts Comma-separated impacts (+ for benefit, - for cost)
56
-
57
- Example Commands
58
-
59
- topsis sample.csv "1,1,1,1" "+,-,+,+"
60
-
61
-
62
- Weights and impacts can also be provided without quotes:
63
-
64
- topsis sample.csv 1,1,1,1 +,-,+,+
65
-
66
-
67
- Example
68
- Input File (sample.csv)
69
-
70
- A CSV file showing data for different mobile handsets with varying features:
71
-
72
- Model,Storage space(in gb),Camera(in MP),Price(in $),Looks(out of 5)
73
- M1,16,12,250,5
74
- M2,16,8,200,3
75
- M3,32,16,300,4
76
- M4,32,8,275,4
77
- M5,16,16,225,2
78
-
79
- Weights Vector
80
- [0.25, 0.25, 0.25, 0.25]
81
-
82
- Impacts Vector
83
- [+, +, -, +]
84
-
85
- Command
86
- topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"
87
-
88
- Output
89
- TOPSIS RESULTS
90
- -----------------------------
91
-
92
- P-Score Rank
93
- 1 0.534277 3
94
- 2 0.308368 5
95
- 3 0.691632 1
96
- 4 0.534737 2
97
- 5 0.401046 4
@@ -1,8 +0,0 @@
1
- topsis_anshul/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- topsis_anshul/topsis.py,sha256=nxT4WXz7Z2KU17EOpviNfBPE4XdB794wSyT0seMzd_k,2556
3
- topsis_anshul_102303930-1.0.1.dist-info/LICENSE,sha256=XFA2fzQCLy41yBxlaoLoMFCr_mFFPsUqtx58outGwfo,689
4
- topsis_anshul_102303930-1.0.1.dist-info/METADATA,sha256=GzFTdBdtFj8Ei7OsRSAtkUhXTFRyA-Vggx_qP3vZjXk,2015
5
- topsis_anshul_102303930-1.0.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
6
- topsis_anshul_102303930-1.0.1.dist-info/entry_points.txt,sha256=fM1Se7TB5H5DyOFpENDatsDEMD1odgCE4QXiT38xW_g,53
7
- topsis_anshul_102303930-1.0.1.dist-info/top_level.txt,sha256=xnQI0g8RBd7KKV__q4kvGFvD4LUGWRp_EQ3TWz5BV_w,14
8
- topsis_anshul_102303930-1.0.1.dist-info/RECORD,,