Step-by-Step Tutorial — TOPSIS
Comprehensive review to make the most of one intuitive MCDM tool
Step-by-Step Tutorial — TOPSIS
Comprehensive review to make the most of one intuitive MCDM tool

What is Intuitive Decision Model
In the field of machine learning, the necessity of an algorithm being intuitive remains a relevant criterion, though not a strict requirement. Being intuitive means it is easy for users and stakeholders, who are mostly non-technical people, to understand the way an algorithm makes its prediction or decision. For instance, imagine a model embedded in your financial technology (fintech) app, specifically designed for investment management like Bibit or Stockbit, and you set an in-app feature that governs a decision wherein every time a stock you bought reaches a specific target price you personally set, it triggers an automatic sell. That is what it means to be intuitive, you understand the rule upon which the machine bases its decision.

One algorithm called Decision Tree is one of the most intuitive model. Above is an example of a decision tree model of deciding transportation mode (source: Displayr)
Well, the prior example might depict a function not complex enough compared to the abundant use cases out there, and that underlines the challenge. Mathematicians and scientists keep working on initiating rules and algorithms robust enough to handle far more sophisticated problems, while still retaining sufficient intuitiveness. And believe me, the more intuitive your model is, the easier it becomes to get your boss’s or stakeholders’ consent, should you want to apply that specific model within your business.
TOPSIS: An intuitive alternative in the realm of MCDM
In operations research, specifically in the subset of Multi-Criteria Decision Making (MCDM), being intuitive is also quite important. MCDM is composed of many methods that are in essence prescriptive tools. And unlike predictive tools that only convey what will happen, prescriptive tools tell users what to do — mostly with precision. Therefore, the need to be communicable and interpretable naturally becomes a requirement to some extent.
We are about to learn TOPSIS, or Technique of Ordering Preference by Similarity to Ideal Solution. Despite being far from a new technique, its adoption has not slowed over the decades. Thanks to many studies that keep proposing modifications and enhancements to the method, like AHP-TOPSIS or P-TOPSIS, which have clearly kept the approach preferable. That said, one other thing I am absolutely certain about regarding TOPSIS’s popularity is that it must be owed to its intuitiveness.
Similar to numerous machine learning algorithms — k-Means Clustering, for instance — TOPSIS adopts a geometrical philosophy in defining how similar or dissimilar entities are from one another. Borrowing reliable distance measures like Euclidean, TOPSIS ensures its interpretability remains accessible even for beginners.
Step-by-Step: TOPSIS, and the make the most out of it
For the tutorial section onwards, we will guide you to try our sandbox to make the learning process more effective and efficient. Please refer to the link below:
https://topsis-demo.vercel.app/
The web app is essentially a TOPSIS calculator. However, I have also equipped it with some interesting analytics that may deepen our understanding of the results, since TOPSIS can appear tricky to new learners as the number of criteria grows.
Once you’ve successfully accessed the sandbox, let’s begin the step-by-step as follows.
Study Case: Cloud Provider Selection
You are a promising entrepreneur venturing into one of the most saturated fields in today’s landscape: digital business. As your business grows, you need a cloud provider to help you scale. Suppose you have narrowed it down to three options: Cloud A, Cloud B, and Cloud C.
After discussing with key stakeholders , such as the CEO and COO, you collectively decide on six criteria to consider:
- Cost: Can be per month or per year
- Uptime: The historical percentage indicating how often the cloud server was up and active
- Security: Measured on an ordinal scale of 1–10. Higher means better
- Support: The average time in minutes a cloud provider typically takes to respond to a support request. Higher means a worse experience
- Integration: Measured between 1–5. A higher score means the cloud service integrates well with many external tools
- Long-Term Discount: Indicates whether the cloud provider guarantees a discount upon service extension
The objective is simple: which among the three is the best option? Behold, for TOPSIS is about to take action.
Step 1: Describe the Decision Matrix
Establish a decision matrix where number of alternatives are evaluated against number of criteria. Below is example of a decision matrix following above study case. Three alternatives, with six criteria.

Our decision matrix for the study case
Note that we have an interesting variety of criterion values here: numerical (cost), percentage (uptime), ordinal (security and integration), duration in minutes (support), and even Yes/No for Long-Term Discount, which we need to transform into binary 0 and 1, since the algorithm cannot take text values as-is. This situation affirms just how robust TOPSIS is for handling such diversity.
Step 2: Normalization
Transform the various units of measurement into a dimensionless scale (usually using vector normalization):

normalization equation
Normalization ensures that the previously varying units of measurement will no longer pose a problem going forward. The dimensionless scale produced by this process makes the new numbers comparable on an apple-to-apple basis.
Step 3: Weight Application
Apply weights to each criterion to reflect its relative importance. But since we have not defined it yet. Suppose this is the agreed upon weight amongst stakeholder:
- Cost: 30%
- Uptime %: 15%
- Security: 20%
- Support: 10%
- Integration: 15%
- Long-Term Discount: 10%
The formula in which weights being impelemented goes like this:

weighted equation over normalized value
Step 4: Compute PIS and NIS
For each criterion, take the best value from all alternatives and place it in a set defining the PIS (A+), or Positive Ideal Solution. Likewise, take the worst value to compose the NIS (A−), or Negative Ideal Solution. PIS and NIS essentially serve as hypothetical best- and worst-case solutions, against which each alternative will be compared in the next step.
Step 5: Compute Distance for each Criterion
Calculate each alternative distance from ideal PIS and negative ideal NIS. We will employ Euclidean here:

distance from PIS

distance from NIS
Step 6: Compute Closeness Coefficient
Last but not least, the final score we will use as a decision reference is derived through a variable called the relative closeness, or closeness coefficient. Theoretically, the score ranges between 0 and 1, and the best candidate alternative is the one whose value is closest to 1.

closeness coefficient equation
Additional Analytics for Discussion
Technically, the TOPSIS computation wraps up at Step 6. However, we extend the sandbox with additional descriptive analytics that I believe will further reveal the method’s interpretability.
In the first section, we have a horizontal bar chart that orders each alternative’s final score given a selected criterion. You can choose different criteria via a dropdown and examine how a specific alternative may dominate others across a couple of criteria — which in turn explains why that alternative ranks higher in the final TOPSIS ordering.

First analytics: Alternative 2 has the highest value of criterion Security
In the second section, we have a scatter plot where our alternatives are placed across two criteria simultaneously, selectable via another dropdown. Given the method’s inherently geometric nature , along with the normalization and weight multiplication performed earlier, reading the scatter plot is as straightforward as it looks: the best alternative is the one whose representative point lies closest to the Positive Ideal Solution (PIS) and farthest from the Negative Ideal Solution (NIS), were a line drawn to connect them. That said, bear in mind that the result here is only applicable when considering those two selected criteria.

Alternative 2 (denoted by blue dot) is the best amongst alternatives over two criteria of Integration and Cost. Alternative 2 edges other alternatives since it’s both closer to PIS A+ and farthest from NIS A-
Obviously, we cannot draw an overall TOPSIS conclusion from the bar chart or scatter plot alone, but these two visualization tools are, I believe, more than sufficient to demonstrate the degree of intuitiveness this method offers, and to help us truly make the most of it.
메타데이터
- post_id
- 1786feb780e1
- slug
- step-by-step-tutorial-topsis-1786feb780e1
- url
- https://medium.com/@lazuardy.almuzaki/step-by-step-tutorial-topsis-1786feb780e1
- canonical_url
- https://medium.com/@lazuardy.almuzaki/step-by-step-tutorial-topsis-1786feb780e1
- author_url
- https://medium.com/@lazuardy.almuzaki
- status
- ok
- fetched_at
- 2026-06-20 20:29:01