# Fuzzy Comprehensive Evaluation Algorithm

> This article is currently an experimental machine translation and may contain errors. If anything is unclear, please refer to [original Chinese version](<https://blog.wendain.ing/posts/fuzzy-comprehensive-evaluation/>). I am continuously working to improve the translation.

Some notes I made while studying mathematical modeling algorithms during the summer of 2025.

<!-- more -->

# Fuzzy Comprehensive Evaluation Algorithm

Mathematical models for handling reality:

- Deterministic mathematical models
- Stochastic mathematical models
- Fuzzy models

Fuzzy sets: unlike classical sets, they have no mutual exclusivity or definiteness

Use a **membership function** to characterize this degree: $\mu _{A} (x) \in[0,1]$; the closer to $1$, the more the element belongs to the set, and vice versa; when $\mu _{A}(x)=0.5$, the fuzziness is greatest

## Representation Methods of Fuzzy Sets

When the universe of discourse X is a finite set, denoted $X={x_{1}, x_{2}, ..., x_{n}}$, then a fuzzy set A on X has three forms of representation

1. Zadeh notation
$$
  A=\sum_{i=1}^{n}\frac{\mu_{A}(i)}{x_{i}}=\frac{\mu_{A}(x_{1})}{x_{1}}+\frac{\mu_{A}(x_{2})}{x_{2}}+...+\frac{\mu_{A}(x_{n})}{x_{n}}
$$
  Note: "∑" and "+" do not mean summation; they are merely notations for summarizing a set
  $\frac{\mu_{A}(i)}{x_{i}}$ is not a fraction either; it indicates that the membership degree of the point $x_{i}$ in the fuzzy set A is $\mu_{A}(x)$

2. Ordered pair notation
    $$
    A=\{(x_{1}, \mu_{A}(x_{1})), (x_{2}, \mu_{A}(x_{2})), ..., (x_{n}, \mu_{A}(x_{n}))\}
    $$

3. Vector notation
    $$
    A=(\mu_{A}(x_{1}), \mu_{A}(x_{2}), ..., \mu_{A}(x_{n}))
    $$
    

$$
当论域 X 为无限集时，则 X 上的模糊集 A 可以写成 A=\int_{x\in X}\frac{\mu_{A}(x)}{x} \\
注：“∫”不是积分的意思，$\frac{\mu_{A}(x_{i})}{x}$也不是分数
$$
## Classification of Fuzzy Sets

- Smaller-is-better type
- Intermediate type
- Larger-is-better type

Similar to the TOPSIS method

The monotonicity of the membership function can be considered

## Methods for Determining Membership Functions

- Rely on existing objective scales

    Example: measuring whether a family is well-off: the Engel coefficient

    If this indicator is not in [0,1], it can be normalized

- Assignment method: pick a function that looks pleasing to you yourself

## Single-Level Fuzzy Evaluation Model: step

### Introducing Three Sets

In fuzzy comprehensive evaluation, three sets are introduced:

① Factor set (set of evaluation indicators) $U=\{u_{1},u_{2},\cdots,u_{n}\}$

② Comment set (the results of the evaluation) $V=\{v_{1},v_{2},\cdots,v_{n}\}$

③ Weight set (the weights of the indicators) $A=\{a_{1},a_{2},\cdots,a_{n}\}$

- Example: evaluating a student's performance

$U=\{\text{专业排名、课外实践、志愿服务、竞赛成绩}\}$

$V=\{\text{优、良、差}\}$

$A=\{0.4、0.2、0.1、0.3\}$

### Determining the Fuzzy Comprehensive Judgment Matrix

For indicator $u_i$, the membership degrees with respect to each comment form a fuzzy subset on V; the judgment for indicator $u_i$ is denoted $R_i=[r_{11},r_{12},...,r_{in}]$

The fuzzy comprehensive judgment matrix for all indicators is
$$
&R=\begin{bmatrix}r_{11}&r_{12}&\cdots&r_{1m}\\r_{11}&r_{22}&\cdots&r_{2m}\\\dots&\dots&\ddots&\dots\\r_{n4}&r_{n2}&\cdots&r_{mm}\end{bmatrix}
$$

### Performing Matrix Multiplication

$$
B=A ·R，得到行向量：即该选项对于评语集的隶属度 \\
取隶属度中最大的一个值作为最终评价
$$
## Python Code

```python
import numpy as np
R = np.array([[]])
A = np.array([])
B = np.dot(R, a)
```
