2.1 直觉模糊集定义
定义1.7 ??设
X
X
X是一个非空经典集合,则称
A
~
=
{
?
x
,
μ
A
~
(
x
)
,
ν
A
~
(
x
)
?
∣
x
∈
X
}
(2.1)
\tilde {A} = \left\{ \left\langle x,\mu_{\tilde{A}}(x), \nu_{\tilde{A}}(x) \right\rangle | x\in X \right\}\tag{2.1}
A~={?x,μA~?(x),νA~?(x)?∣x∈X}(2.1) ??为
X
X
X上的一个直觉模糊集,其中
μ
A
~
(
x
)
\mu_{\tilde{A}}(x)
μA~?(x)和
v
A
~
(
x
)
v_{\tilde{A}}(x)
vA~?(x)分别为元素x属于
A
~
\tilde{A}
A~的隶属度和非隶属度,即
μ
A
~
:
X
→
[
0
,
1
]
,
x
∈
X
→
μ
A
~
(
x
)
∈
[
0
,
1
]
\mu_{\tilde{A}}:X \rightarrow [0,1], x \in X \rightarrow \mu_{\tilde{A}}(x) \in [0,1]
μA~?:X→[0,1],x∈X→μA~?(x)∈[0,1]
ν
A
~
:
X
→
[
0
,
1
]
,
x
∈
X
→
ν
A
~
(
x
)
∈
[
0
,
1
]
\nu_{\tilde{A}}:X \rightarrow [0,1], x \in X \rightarrow \nu_{\tilde{A}}(x) \in [0,1]
νA~?:X→[0,1],x∈X→νA~?(x)∈[0,1] ??且满足
0
≤
μ
A
~
(
x
)
+
ν
A
~
(
x
)
≤
1
,
x
∈
X
0 \leq \mu_{\tilde{A}}(x) + \nu_{\tilde{A}}(x) \leq 1, x \in X
0≤μA~?(x)+νA~?(x)≤1,x∈X ??式中,
μ
A
~
\mu_{\tilde{A}}
μA~?和
ν
A
~
\nu_{\tilde{A}}
νA~?分别表示支持元素x属于集合
A
A
A的证据所导出的肯定隶属度的下界和反对元素x属于集合
A
A
A的证据所导出的否定隶属度的下界。
X
X
X上所有直觉模糊集的集合记为
F
(
X
)
F(X)
F(X)。
??直觉模糊集可以简记为
A
~
=
?
x
,
μ
A
~
,
ν
A
~
?
\tilde{A}=\left\langle x,\mu_{\tilde{A}},\nu_{\tilde{A}}\right\rangle
A~=?x,μA~?,νA~??或者
A
~
=
?
μ
A
~
,
ν
A
~
?
/
x
\tilde{A}=\left\langle\mu_{\tilde{A}},\nu_{\tilde{A}}\right\rangle/x
A~=?μA~?,νA~??/x。
??显然,每一个模糊集
A
~
\tilde{A}
A~对应于下列直觉模糊集:
A
~
=
{
?
x
,
μ
A
~
(
x
)
,
1
?
μ
A
~
(
x
)
?
∣
x
∈
X
}
(2.2)
\tilde{A} = \left\{ \left\langle x,\mu_{\tilde{A}}(x),1-\mu_{\tilde{A}}(x)\right\rangle|x \in X \right\}\tag{2.2}
A~={?x,μA~?(x),1?μA~?(x)?∣x∈X}(2.2) ??对于任一
x
∈
X
x \in X
x∈X,称
π
A
~
=
1
?
μ
A
~
(
x
)
?
ν
A
~
(
x
)
\pi_{\tilde{A}}=1-\mu_{\tilde{A}}(x)-\nu_{\tilde{A}}(x)
πA~?=1?μA~?(x)?νA~?(x)为直觉模糊集
A
~
\tilde{A}
A~中元素x的直觉指数(intuitionistic index),它表示元素x对
A
~
\tilde{A}
A~的犹豫度(hesitancy degree)。显然,对于每一个
x
∈
X
x \in X
x∈X,
0
≤
π
A
~
≤
1
0 \leq \pi_{\tilde{A}} \leq 1
0≤πA~?≤1。特别地,如果
π
A
~
(
x
)
=
1
?
μ
A
~
(
x
)
?
[
1
?
μ
A
~
]
=
0
,
x
∈
X
(2.3)
\pi_{\tilde{A}}(x)=1-\mu_{\tilde{A}}(x)-[1-\mu_{\tilde{A}}]=0, x \in X\tag{2.3}
πA~?(x)=1?μA~?(x)?[1?μA~?]=0,x∈X(2.3) ??则直觉模糊集
A
~
\tilde{A}
A~退化为Zadeh的模糊集。因此,Zadeh的模糊集是直觉模糊集的一个特例。
??示例
6个梨属于成熟和不成熟的程度分别为
[
(
0.6
,
0.3
)
,
(
0.7
,
0.2
)
,
(
0.6
,
0.4
)
,
(
0.5
,
0.2
)
,
(
0.7
,
0.2
)
,
(
0.8
,
0.1
)
]
[(0.6,0.3),(0.7,0.2),(0.6,0.4),(0.5,0.2),(0.7,0.2),(0.8,0.1)]
[(0.6,0.3),(0.7,0.2),(0.6,0.4),(0.5,0.2),(0.7,0.2),(0.8,0.1)] 其中第1个梨属于成熟的概率为0.6,属于不成熟的概率为0.3
2.2 直觉模糊集运算法则
定义1.8 ??设
A
~
\tilde{A}
A~和
B
~
\tilde{B}
B~是论域X上的两个直觉模糊集,
A
~
=
{
?
x
,
μ
A
~
(
x
)
,
ν
A
~
(
x
)
?
∣
x
∈
X
}
\tilde{A}=\left\{ \left\langle x,\mu_{\tilde{A}}(x),\nu_{\tilde{A}}(x)\right\rangle|x \in X \right\}
A~={?x,μA~?(x),νA~?(x)?∣x∈X},
B
~
=
{
?
x
,
μ
B
~
(
x
)
,
ν
B
~
(
x
)
?
∣
x
∈
X
}
\tilde{B}=\left\{ \left\langle x,\mu_{\tilde{B}}(x),\nu_{\tilde{B}}(x)\right\rangle|x \in X \right\}
B~={?x,μB~?(x),νB~?(x)?∣x∈X},
λ
>
0
\lambda \gt 0
λ>0是任意实数,则
??(1)?直觉模糊集的包含关系:
A
~
?
B
~
\tilde{A} \subseteq \tilde{B}
A~?B~当且仅当
?
x
∈
X
,
μ
A
~
(
x
)
≤
μ
B
~
\forall x \in X, \mu_{\tilde{A}}(x)\leq \mu_{\tilde{B}}
?x∈X,μA~?(x)≤μB~?且
ν
A
~
(
x
)
≥
ν
B
~
\nu_{\tilde{A}}(x)\geq \nu_{\tilde{B}}
νA~?(x)≥νB~?
??(2)?直觉模糊集的相等关系:
A
~
=
B
~
\tilde{A} = \tilde{B}
A~=B~当且仅当
?
x
∈
X
,
μ
A
~
(
x
)
=
μ
B
~
\forall x \in X, \mu_{\tilde{A}}(x)= \mu_{\tilde{B}}
?x∈X,μA~?(x)=μB~?且
ν
A
~
(
x
)
=
ν
B
~
\nu_{\tilde{A}}(x)= \nu_{\tilde{B}}
νA~?(x)=νB~?
??(3)?直觉模糊集的补:
(
A
~
)
c
=
{
?
x
,
ν
A
~
(
x
)
,
μ
A
~
(
x
)
?
∣
x
∈
X
}
{(\tilde{A})}^c = \left\{ \left\langle x,\nu_{\tilde{A}}(x),\mu_{\tilde{A}}(x) \right\rangle|x \in X \right\}
(A~)c={?x,νA~?(x),μA~?(x)?∣x∈X}
??(4)?直觉模糊集的交:
A
~
∩
B
~
=
{
?
x
,
μ
A
~
(
x
)
∧
μ
B
~
(
x
)
,
ν
A
~
(
x
)
∨
ν
B
~
(
x
)
?
∣
x
∈
X
}
\tilde{A} \cap \tilde{B} = \left\{ \left\langle x,\mu_{\tilde{A}}(x)\wedge\mu_{\tilde{B}}(x),\nu_{\tilde{A}}(x)\vee\nu_{\tilde{B}}(x) \right\rangle|x \in X \right\}
A~∩B~={?x,μA~?(x)∧μB~?(x),νA~?(x)∨νB~?(x)?∣x∈X} 式中,符号“
∧
\wedge
∧”“
∨
\vee
∨”分别表示取小或取大算子,即
min
?
\min
min和
max
?
\max
max算子。
??(5)?直觉模糊的并:
A
~
∪
B
~
=
{
?
x
,
μ
A
~
(
x
)
∨
μ
B
~
(
x
)
,
ν
A
~
(
x
)
∧
ν
B
~
(
x
)
?
∣
x
∈
X
}
\tilde{A} \cup \tilde{B} = \left\{ \left\langle x,\mu_{\tilde{A}}(x)\vee\mu_{\tilde{B}}(x),\nu_{\tilde{A}}(x)\wedge\nu_{\tilde{B}}(x) \right\rangle|x \in X \right\}
A~∪B~={?x,μA~?(x)∨μB~?(x),νA~?(x)∧νB~?(x)?∣x∈X}
??(6)?直觉模糊集的和:
A
~
+
B
~
=
{
?
x
,
μ
A
~
(
x
)
+
μ
B
~
(
x
)
?
μ
A
~
(
x
)
μ
B
~
(
x
)
,
ν
A
~
(
x
)
ν
B
~
(
x
)
?
∣
x
∈
X
}
\tilde{A} + \tilde{B} = \left\{ \left\langle x,\mu_{\tilde{A}}(x) + \mu_{\tilde{B}}(x) - \mu_{\tilde{A}}(x)\mu_{\tilde{B}}(x),\nu_{\tilde{A}}(x)\nu_{\tilde{B}}(x) \right\rangle|x \in X \right\}
A~+B~={?x,μA~?(x)+μB~?(x)?μA~?(x)μB~?(x),νA~?(x)νB~?(x)?∣x∈X}
??(7)?直觉模糊集的积:
A
~
?
B
~
=
{
?
x
,
μ
A
~
(
x
)
μ
B
~
(
x
)
,
ν
A
~
(
x
)
+
ν
B
~
(
x
)
?
μ
A
~
(
x
)
μ
B
~
(
x
)
?
∣
x
∈
X
}
\tilde{A} \centerdot \tilde{B} = \left\{ \left\langle x,\mu_{\tilde{A}}(x) \mu_{\tilde{B}}(x),\nu_{\tilde{A}}(x) + \nu_{\tilde{B}}(x) - \mu_{\tilde{A}}(x)\mu_{\tilde{B}}(x) \right\rangle|x \in X \right\}
A~?B~={?x,μA~?(x)μB~?(x),νA~?(x)+νB~?(x)?μA~?(x)μB~?(x)?∣x∈X}
??(8)?直觉模糊集与数的乘积:
λ
A
~
=
{
?
x
,
1
?
(
1
?
μ
A
~
(
x
)
)
λ
,
(
ν
A
~
)
λ
?
∣
x
∈
X
}
\lambda \tilde{A} = \left\{ \left\langle x,1-{(1-\mu_{\tilde{A}}(x))}^{\lambda},{(\nu_{\tilde{A}})}^{\lambda} \right\rangle|x \in X \right\}
λA~={?x,1?(1?μA~?(x))λ,(νA~?)λ?∣x∈X}
??(9)?直觉模糊集的乘方:
(
A
~
)
λ
=
{
?
x
,
(
μ
A
~
)
λ
,
1
?
(
1
?
ν
A
~
(
x
)
)
λ
?
∣
x
∈
X
}
{(\tilde{A})}^{\lambda} = \left\{ \left\langle x,{(\mu_{\tilde{A}})}^{\lambda},1-{(1-\nu_{\tilde{A}}(x))}^{\lambda} \right\rangle|x \in X \right\}
(A~)λ={?x,(μA~?)λ,1?(1?νA~?(x))λ?∣x∈X}
??截集是直觉模糊集中的一个重要概念,是建立直觉模糊集与清晰集合之间关系的桥梁。
定义1.9 ??设
A
~
=
{
?
x
,
μ
t
i
l
d
e
A
(
x
)
,
ν
A
~
(
x
)
?
∣
x
∈
X
}
\tilde{A}=\left\{ \left\langle x,\mu_{tilde{A}}(x),\nu_{\tilde{A}}(x) \right\rangle|x \in X \right\}
A~={?x,μtildeA?(x),νA~?(x)?∣x∈X}是论域X上的1个直觉模糊集,对任意有序对
?
α
,
β
?
\left\langle\alpha,\beta \right\rangle
?α,β?,其中
α
∈
[
0
,
1
]
,
β
∈
[
0
,
1
]
\alpha \in [0,1],\beta \in [0,1]
α∈[0,1],β∈[0,1],且
0
≤
α
+
β
≤
1
0 \leq \alpha + \beta \leq 1
0≤α+β≤1,称集合
A
~
?
α
,
β
?
=
{
x
∣
μ
A
~
(
x
)
≥
α
,
ν
A
~
≤
β
,
x
∈
X
}
(2.4)
{\tilde{A}}_{\left\langle\alpha,\beta\right\rangle = \left\{x|\mu_{\tilde{A}}(x)\geq\alpha,\nu_{\tilde{A}}\leq\beta, x \in X \right\}}\tag{2.4}
A~?α,β?={x∣μA~?(x)≥α,νA~?≤β,x∈X}?(2.4) 为直觉模糊集
A
~
\tilde{A}
A~的
?
α
,
β
?
\left\langle\alpha,\beta\right\rangle
?α,β?截集(或水平集),
?
α
,
β
?
\left\langle\alpha,\beta\right\rangle
?α,β?称为置信水平或置信度。
α
=
1
,
β
=
0
\alpha=1,\beta=0
α=1,β=0时的截集即
A
~
?
1
,
0
?
{\tilde{A}}_{\left\langle 1,0\right\rangle}
A~?1,0??称为直觉模糊集
A
~
\tilde{A}
A~的核;
α
=
0
,
β
=
1
\alpha=0,\beta=1
α=0,β=1时的截集即
A
~
?
0
,
1
?
{\tilde{A}}_{\left\langle0,1\right\rangle}
A~?0,1??称为直觉模糊集
A
~
\tilde{A}
A~的支撑。
??显然,若两个有序对
?
α
1
,
β
1
?
\left\langle{\alpha}_1,{\beta}_1\right\rangle
?α1?,β1??核
?
α
2
,
β
2
?
\left\langle{\alpha}_2,{\beta}_2\right\rangle
?α2?,β2??满足
?
α
1
,
β
1
?
≤
?
α
2
,
β
2
?
\left\langle{\alpha}_1,{\beta}_1\right\rangle\leq\left\langle{\alpha}_2,{\beta}_2\right\rangle
?α1?,β1??≤?α2?,β2??,则有
A
~
?
α
1
,
β
1
?
?
A
~
?
α
2
,
β
2
?
{\tilde{A}}_{\left\langle{\alpha}_1,{\beta}_1\right\rangle}\subseteq{\tilde{A}}_{\left\langle{\alpha}_2,{\beta}_2\right\rangle}
A~?α1?,β1????A~?α2?,β2???。 ??类似地,可以定义直觉模糊集的
α
\alpha
α截集核
β
\beta
β截集:
A
~
α
=
{
x
∣
μ
A
~
(
x
)
≥
α
,
x
∈
X
}
(2.5)
{\tilde{A}}_{\alpha}=\left\{x|\mu_{\tilde{A}}(x)\geq\alpha,x \in X \right\}\tag{2.5}
A~α?={x∣μA~?(x)≥α,x∈X}(2.5)
A
~
β
=
{
x
∣
ν
A
~
(
x
)
≤
β
,
x
∈
X
}
(2.6)
{\tilde{A}}_{\beta}=\left\{x|\nu_{\tilde{A}}(x)\leq\beta,x \in X \right\}\tag{2.6}
A~β?={x∣νA~?(x)≤β,x∈X}(2.6) 其中,
α
∈
[
0
,
1
]
,
β
∈
[
0
,
1
]
\alpha \in [0,1],\beta \in [0,1]
α∈[0,1],β∈[0,1]。
??由此,可以定义一个新的直觉模糊集:
?
α
,
β
?
A
~
?
α
,
β
?
=
{
?
x
,
α
∧
μ
A
~
?
α
,
β
?
(
x
)
,
β
∨
ν
A
~
α
,
β
(
x
)
?
∣
x
∈
X
}
\left\langle\alpha,\beta\right\rangle{\tilde{A}}_{\left\langle\alpha,\beta\right\rangle}=\left\{ \left\langle x,\alpha \wedge \mu_{{\tilde{A}}_{\left\langle\alpha,\beta\right\rangle}}(x),\beta \vee \nu_{{\tilde{A}}_{\alpha,\beta}}(x)\right\rangle|x \in X \right\}
?α,β?A~?α,β??={?x,α∧μA~?α,β???(x),β∨νA~α,β??(x)?∣x∈X} 于是直觉模糊集
A
~
\tilde{A}
A~可以用
<
?
α
,
β
?
<\left\langle \alpha,\beta \right\rangle
<?α,β?截集(或水平集)表示。
定理1.3 ??直觉模糊集
A
~
\tilde{A}
A~可用截集表示为
A
~
=
?
α
,
β
∈
D
{
?
α
,
β
?
A
~
?
α
,
β
?
}
\tilde{A}=\bigcup_{{\alpha,\beta}\in D}\left\{ \left\langle \alpha,\beta \right\rangle{{\tilde{A}}_{ \left\langle \alpha,\beta \right\rangle}}\right\}
A~=α,β∈D??{?α,β?A~?α,β??}
其中,
D
=
{
?
μ
s
,
ν
s
?
∣
S
∧
M
}
D = \{ \left\langle \mu_s,\nu_s \right\rangle|S \wedge M\}
D={?μs?,νs??∣S∧M},
M
=
{
?
μ
i
,
ν
i
?
∣
i
=
1
,
2
,
.
.
.
,
m
}
M = \{ \left\langle\mu_i, \nu_i\right\rangle | i=1,2,...,m \}
M={?μi?,νi??∣i=1,2,...,m},
μ
s
=
?
1
:
?
μ
i
,
ν
i
?
∈
S
{
μ
i
}
\mu_{s}=\bigwedge_{1:\left\langle\mu_{i}, \nu_{i}\right\rangle \in S} \left\{\mu_{i}\right\}
μs?=?1:?μi?,νi??∈S?{μi?},
ν
s
=
∨
i
:
<
μ
i
,
ν
i
>
∈
S
{
ν
i
}
{\nu_s} = \underset{i:<\mu_i, \nu_i> \in S} {\vee} \{\nu_{i}\}
νs?=i:<μi?,νi?>∈S∨?{νi?} ??定理1.3表明,直觉模糊集
A
~
\tilde{A}
A~可以由若干个清晰的截集(或水平集)表示,它建立了直觉模糊集与清晰集合之间的关系,为利用清晰集合研究直觉模糊集提供了重要基础。
??示例
一箱梨有6个,依次编号为1-6,甲乙分别对每个梨属于成熟和属于不成熟进行评价,得到以下结果:
A
甲
=
(
0
,
6
,
0.4
)
,
(
0.7
,
0.2
)
,
(
0.7
,
0.2
)
,
(
0.8
,
0.1
)
,
(
0.8
,
0.2
)
,
(
0.6
,
0.3
)
A_{甲}={(0,6,0.4),(0.7,0.2),(0.7,0.2),(0.8,0.1),(0.8,0.2),(0.6,0.3)}
A甲?=(0,6,0.4),(0.7,0.2),(0.7,0.2),(0.8,0.1),(0.8,0.2),(0.6,0.3)
A
乙
=
(
0
,
6
,
0.3
)
,
(
0.6
,
0.3
)
,
(
0.6
,
0.2
)
,
(
0.7
,
0.2
)
,
(
0.7
,
0.2
)
,
(
0.7
,
0.2
)
A_{乙}={(0,6,0.3),(0.6,0.3),(0.6,0.2),(0.7,0.2),(0.7,0.2),(0.7,0.2)}
A乙?=(0,6,0.3),(0.6,0.3),(0.6,0.2),(0.7,0.2),(0.7,0.2),(0.7,0.2)
??计算代码(python)如下:
import numpy as np
A = [[0.6,0.7,0.7,0.8,0.8,0.6],[0.4,0.2,0.2,0.1,0.2,0.3]]
B = [[0.6,0.6,0.6,0.7,0.7,0.7],[0.3,0.3,0.2,0.2,0.2,0.2]]
A = np.array(A)
B = np.array(B)
def A_in_B(A,B):
label_A_B = np.zeros(A.shape[1])
label_B_A = np.zeros(A.shape[1])
shape = A.shape
for i in range(shape[1]):
A_belong = A[0][i]
A_not_belong = A[1][i]
B_belong = B[0][i]
B_not_belong = B[1][i]
if A_belong <= B_belong and A_not_belong >= B_not_belong:
label_A_B[i] = 1
elif A_belong >= B_belong and A_not_belong <= B_not_belong:
label_B_A[i] = 1
sum_A = label_A_B.sum()
sum_B = label_B_A.sum()
if int(sum_A) == A.shape[1]:
print('A belongs to B!')
elif int(sum_B) == A.shape[1]:
print('B belongs to A!')
else:
print('No belongs')
print('=========包含关系结果==========')
A_in_B(A,B)
print('\n')
def get_complement(arr):
return [arr[1],arr[0]]
A_c = get_complement(A)
B_c = get_complement(B)
print('=========补集计算结果==========')
print("直觉模糊集A的补集为:\n{}".format(A_c))
print("直觉模糊集B的补集为:\n{}".format(B_c))
print('\n')
def get_intersection(A,B):
intersection = np.zeros(A.shape)
for i in range(A.shape[1]):
intersection[0][i] = min(A[0][i],B[0][i])
intersection[1][i] = max(A[1][i],B[1][i])
return intersection
print('=========交集计算结果==========')
intersection = get_intersection(A,B)
print("直觉模糊集A和直觉模糊集B的交集为:\n{}".format(intersection))
print('\n')
def get_union(A,B):
union = np.zeros(A.shape)
for i in range(A.shape[1]):
union[0][i] = max(A[0][i],B[0][i])
union[1][i] = max(A[1][i],B[1][i])
return union
print('=========并集计算结果==========')
union = get_union(A,B)
print("直觉模糊集A和直觉模糊集B的并集为:\n{}".format(union))
print('\n')
def get_sum(A,B):
sum_R = np.zeros(A.shape)
for i in range(A.shape[1]):
sum_R[0][i] = A[0][i] + B[0][i] - A[0][i] * B[0][i]
sum_R[1][i] = A[1][i] * B[1][i]
return sum_R
print('=========求和计算结果==========')
sum_r = get_sum(A,B)
print("直觉模糊集A和直觉模糊集B的和为:\n{}".format(sum_r))
print('\n')
def get_quadrature(A,B):
quadrature = np.zeros(A.shape)
for i in range(A.shape[1]):
quadrature[0][i] = A[0][i] * B[0][i]
quadrature[1][i] = A[1][i] + B[1][i] - A[1][i] * B[1][i]
return quadrature
print('=========并积计算结果==========')
quadrature = get_quadrature(A,B)
print("直觉模糊集A和直觉模糊集B的积为:\n{}".format(quadrature))
print('\n')
def get_number_multiplication(arr,factor):
multi_fator = np.zeros(arr.shape)
for i in range(arr.shape[1]):
multi_fator[0][i] = 1 - np.power(1 - arr[0][i],factor)
multi_fator[1][i] = np.power(arr[1][i],factor)
return multi_fator
A_nm = get_number_multiplication(A,0.6)
B_nm = get_number_multiplication(B,0.6)
print('=========数乘计算结果==========')
print("直觉模糊集A的数乘(×0.6)结果为:\n{}".format(A_nm))
print("直觉模糊集B的数乘(×0.6)结果为:\n{}".format(B_nm))
print('\n')
def get_power_number(arr,factor):
power_factor = np.zeros(arr.shape)
for i in range(arr.shape[1]):
power_factor[0][i] = np.power(arr[0][i],factor)
power_factor[1][i] = 1 - np.power(1 - arr[1][i],factor)
return power_factor
A_pn = get_power_number(A,0.6)
B_pn = get_power_number(B,0.6)
print('=========乘方计算结果==========')
print("直觉模糊集A的乘方(×0.6)结果为:\n{}".format(A_pn))
print("直觉模糊集B的乘方(×0.6)结果为:\n{}".format(B_pn))
print('\n')
??运行结果为:
=
=
=
=
=
=
=
=
=
包
含
关
系
结
果
=
=
=
=
=
=
=
=
=
=
=========包含关系结果==========
=========包含关系结果========== No belongs
=
=
=
=
=
=
=
=
=
补
集
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========补集计算结果==========
=========补集计算结果========== 直觉模糊集A的补集为: [array([0.4, 0.2, 0.2, 0.1, 0.2, 0.3]), array([0.6, 0.7, 0.7, 0.8, 0.8, 0.6])] 直觉模糊集B的补集为: [array([0.3, 0.3, 0.2, 0.2, 0.2, 0.2]), array([0.6, 0.6, 0.6, 0.7, 0.7, 0.7])]
=
=
=
=
=
=
=
=
=
交
集
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========交集计算结果==========
=========交集计算结果========== 直觉模糊集A和直觉模糊集B的交集为: [[0.6 0.6 0.6 0.7 0.7 0.6] [0.4 0.3 0.2 0.2 0.2 0.3]]
=
=
=
=
=
=
=
=
=
并
集
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========并集计算结果==========
=========并集计算结果========== 直觉模糊集A和直觉模糊集B的并集为: [[0.6 0.7 0.7 0.8 0.8 0.7] [0.4 0.3 0.2 0.2 0.2 0.3]]
=
=
=
=
=
=
=
=
=
求
和
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========求和计算结果==========
=========求和计算结果========== 直觉模糊集A和直觉模糊集B的和为: [[0.84 0.88 0.88 0.94 0.94 0.88] [0.12 0.06 0.04 0.02 0.04 0.06]]
=
=
=
=
=
=
=
=
=
并
积
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========并积计算结果==========
=========并积计算结果========== 直觉模糊集A和直觉模糊集B的积为: [[0.36 0.42 0.42 0.56 0.56 0.42] [0.58 0.44 0.36 0.28 0.36 0.44]]
=
=
=
=
=
=
=
=
=
数
乘
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========数乘计算结果==========
=========数乘计算结果========== 直觉模糊集A的数乘(×0.6)结果为: [[0.42292004 0.51440663 0.51440663 0.61926921 0.61926921 0.42292004] [0.57707996 0.38073079 0.38073079 0.25118864 0.38073079 0.48559337]] 直觉模糊集B的数乘(×0.6)结果为: [[0.42292004 0.42292004 0.42292004 0.51440663 0.51440663 0.51440663] [0.48559337 0.48559337 0.38073079 0.38073079 0.38073079 0.38073079]]
=
=
=
=
=
=
=
=
=
乘
方
计
算
结
果
=
=
=
=
=
=
=
=
=
=
=========乘方计算结果==========
=========乘方计算结果========== 直觉模糊集A的乘方(×0.6)结果为: [[0.73602192 0.80734438 0.80734438 0.87468966 0.87468966 0.73602192] [0.26397808 0.12531034 0.12531034 0.06125961 0.12531034 0.19265562]] 直觉模糊集B的乘方(×0.6)结果为: [[0.73602192 0.73602192 0.73602192 0.80734438 0.80734438 0.80734438] [0.19265562 0.19265562 0.12531034 0.12531034 0.12531034 0.12531034]]
2.3 直觉模糊集的相似度与距离
??相似度与距离是直觉模糊集理论中的一对对偶概念,用以反映两个直觉模糊集之间的接近程度和差异程度。 定义1.10 ??设
s
:
F
(
X
)
×
F
(
X
)
→
[
0
,
1
]
s: F(X) × F(X) \rightarrow [0,1]
s:F(X)×F(X)→[0,1]是一映射,对于任意直觉模糊集
A
~
∈
F
(
X
)
\tilde{A} \in F(X)
A~∈F(X),
B
~
∈
F
(
X
)
\tilde{B} \in F(X)
B~∈F(X),
C
~
∈
F
(
X
)
\tilde{C} \in F(X)
C~∈F(X),称
s
(
A
~
,
B
~
)
s(\tilde{A},\tilde{B})
s(A~,B~)为直觉模糊集
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的相似度,如果它满足条件:
??(1)?
0
≤
s
(
A
~
,
B
~
)
≤
1
0 \leq s(\tilde{A},\tilde{B}) \leq 1
0≤s(A~,B~)≤1;
??(2)?
s
(
A
~
,
B
~
)
=
1
s(\tilde{A},\tilde{B})=1
s(A~,B~)=1当且仅当
A
~
=
B
~
\tilde{A}=\tilde{B}
A~=B~;
??(3)?
s
(
A
~
,
B
~
)
=
s
(
B
~
,
A
~
)
s(\tilde{A},\tilde{B}) = s(\tilde{B},\tilde{A})
s(A~,B~)=s(B~,A~);
??(4)? 如果
A
~
?
B
~
?
C
~
\tilde{A}\subseteq \tilde{B} \subseteq \tilde{C}
A~?B~?C~,则
s
(
A
~
,
C
~
)
≤
s
(
A
~
,
B
~
)
s(\tilde{A},\tilde{C}) \leq s(\tilde{A},\tilde{B})
s(A~,C~)≤s(A~,B~)且
s
(
A
~
,
C
~
)
≤
s
(
B
~
,
C
~
)
s(\tilde{A},\tilde{C}) \leq s(\tilde{B},\tilde{C})
s(A~,C~)≤s(B~,C~)。
??根据定义1.10,对于有限论域
X
=
x
1
,
x
2
,
.
.
.
,
x
n
X={x_1,x_2,...,x_n}
X=x1?,x2?,...,xn?上的两个直觉模糊集
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~,可构造以下相似度测度。
??闵可夫斯基相似度:
s
q
(
A
~
,
B
~
)
=
1
?
[
1
2
n
∑
j
=
1
n
[
(
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
)
q
+
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
)
q
+
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
)
q
]
]
1
/
q
s_{q}(\tilde{A}, \tilde{B})=1-\left[\frac{1}{2 n} \sum_{j=1}^{n}\left[\left(\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right)^{q}+\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right)^{q}+\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right)^{q}\right]\right]^{1 / q}
sq?(A~,B~)=1?[2n1?j=1∑n?[(μA~?(xj?)?μB~?(xj?))q+(νA~?(xj?)?νB~?(xj?))q+(πA~?(xj?)?πB~?(xj?))q]]1/q
??汉明相似度:
s
1
(
A
~
,
B
~
)
=
1
?
[
1
2
n
∑
j
=
1
n
[
∣
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
∣
+
∣
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
∣
+
∣
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
∣
]
]
s_{1}(\tilde{A}, \tilde{B})=1-\left[\frac{1}{2 n} \sum_{j=1}^{n}\left[\left|\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right|+\mid\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)|+|\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right) \mid\right]\right]\right.\right.
s1?(A~,B~)=1?[2n1?j=1∑n?[∣μA~?(xj?)?μB~?(xj?)∣+∣(νA~?(xj?)?νB~?(xj?)∣+∣(πA~?(xj?)?πB~?(xj?)∣]]
??欧几里得相似度:
s
2
(
A
~
,
B
~
)
=
1
?
[
1
2
n
∑
j
=
1
n
[
(
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
)
2
+
(
ν
λ
(
x
j
)
?
ν
B
~
(
x
j
)
)
2
+
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
)
2
]
]
1
/
2
s_{2}(\tilde{A}, \tilde{B})=1-\left[\frac{1}{2 n} \sum_{j=1}^{n}\left[\left(\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right)^{2}+\left(\nu_{\lambda}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right)^{2}+\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right)^{2}\right]\right]^{1 / 2}
s2?(A~,B~)=1?[2n1?j=1∑n?[(μA~?(xj?)?μB~?(xj?))2+(νλ?(xj?)?νB~?(xj?))2+(πA~?(xj?)?πB~?(xj?))2]]1/2
??切比雪夫相似度:
s
+
∞
(
A
~
,
B
~
)
=
1
?
max
?
1
?
j
?
n
{
∣
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
∣
+
∣
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
∣
+
∣
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
∣
2
n
}
s_{+\infty}(\tilde{A}, \tilde{B})=1-\max _{1 \leqslant j \leqslant n}\left\{\frac{\left|\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right|+\left|\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right|+\left|\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right|}{2 n}\right\}
s+∞?(A~,B~)=1?1?j?nmax?{2n∣μA~?(xj?)?μB~?(xj?)∣+∣νA~?(xj?)?νB~?(xj?)∣+∣πA~?(xj?)?πB~?(xj?)∣?}
??如果考虑权重因素,可分别得到直觉模糊集
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的加权闵可夫斯基相似度
s
ˉ
q
(
A
~
,
B
~
)
\bar{s}_{q}(\tilde{A}, \tilde{B})
sˉq?(A~,B~)、加权汉明相似度
s
ˉ
1
(
A
~
,
B
~
)
\bar{s}_{1}(\tilde{A}, \tilde{B})
sˉ1?(A~,B~)、加权欧几里得相似度
s
ˉ
2
(
A
~
,
B
~
)
\bar{s}_{2}(\tilde{A}, \tilde{B})
sˉ2?(A~,B~)、加权切比雪夫相似度
s
ˉ
+
∞
(
A
~
,
B
~
)
\bar{s}_{+\infty}(\tilde{A}, \tilde{B})
sˉ+∞?(A~,B~)等。
定义1.11 ??设
d
:
F
(
X
)
×
F
(
X
)
→
[
0
,
1
]
d: F(X) \times F(X) \rightarrow[0,1]
d:F(X)×F(X)→[0,1]是一映射,对于任意直觉模糊集
A
~
=
F
(
X
)
\tilde{A}=F(X)
A~=F(X),
B
~
=
F
(
X
)
\tilde{B}=F(X)
B~=F(X),
C
~
=
F
(
X
)
\tilde{C}=F(X)
C~=F(X),称
d
(
A
~
,
B
~
)
d(\tilde{A},\tilde{B})
d(A~,B~)为直觉模糊集
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的距离,如果它满足条件:
??(1)?
0
?
d
(
A
~
,
B
~
)
?
1
0 \leqslant d(\tilde{A}, \tilde{B}) \leqslant 1
0?d(A~,B~)?1;
??(2)?
d
(
A
~
,
B
~
)
=
0
d(\tilde{A}, \tilde{B})=0
d(A~,B~)=0当且仅当
A
~
=
B
~
\tilde{A} = \tilde{B}
A~=B~;
??(3)?
d
(
A
~
,
B
~
)
=
d
(
B
~
,
A
~
)
d(\tilde{A}, \tilde{B})=d(\tilde{B}, \tilde{A})
d(A~,B~)=d(B~,A~);
??(4)? 如果
A
~
?
B
~
?
C
~
\tilde{A} \subseteq \tilde{B} \subseteq \tilde{C}
A~?B~?C~,则
d
(
A
~
,
C
~
)
?
d
(
A
~
,
B
~
)
d(\tilde{A}, \tilde{C}) \geqslant d(\tilde{A}, \tilde{B})
d(A~,C~)?d(A~,B~)且
d
(
A
~
,
C
~
)
?
d
(
C
~
,
B
~
)
d(\tilde{A}, \tilde{C}) \geqslant d(\tilde{C}, \tilde{B})
d(A~,C~)?d(C~,B~)。
定理1.4 ??如果
s
(
A
~
,
B
~
)
s(\tilde{A},\tilde{B})
s(A~,B~)为直觉模糊集
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的归一化距离,则
s
(
A
~
,
B
~
)
=
1
?
d
(
A
~
,
B
~
)
s(\tilde{A},\tilde{B})=1-d(\tilde{A},\tilde{B})
s(A~,B~)=1?d(A~,B~)是
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的相似度。
定理1.5 ??根据直觉模糊集
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的相似度测度公式,对应地可以得到
A
~
\tilde{A}
A~与
B
~
\tilde{B}
B~的归一化距离。
??闵可夫斯基距离:
d
q
(
A
~
,
B
~
)
=
[
1
2
n
∑
j
=
1
n
[
(
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
)
q
+
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
)
q
+
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
)
q
]
]
1
/
q
d_{q}(\tilde{A}, \tilde{B})=\left[\frac{1}{2 n} \sum_{j=1}^{n}\left[\left(\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right)^{q}+\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right)^{q}+\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right)^{q}\right]\right]^{1 / q}
dq?(A~,B~)=[2n1?j=1∑n?[(μA~?(xj?)?μB~?(xj?))q+(νA~?(xj?)?νB~?(xj?))q+(πA~?(xj?)?πB~?(xj?))q]]1/q
??汉明距离:
d
1
(
A
~
,
B
~
)
=
[
1
2
n
∑
j
=
1
n
[
∣
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
∣
+
∣
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
∣
+
∣
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
∣
]
]
d_{1}(\tilde{A}, \tilde{B})=\left[\frac{1}{2 n} \sum_{j=1}^{n}\left[\left|\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right|+\mid\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)|+|\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right) \mid\right]\right]\right.\right.
d1?(A~,B~)=[2n1?j=1∑n?[∣μA~?(xj?)?μB~?(xj?)∣+∣(νA~?(xj?)?νB~?(xj?)∣+∣(πA~?(xj?)?πB~?(xj?)∣]]
??欧几里得距离:
d
2
(
A
~
,
B
~
)
=
[
1
2
n
∑
j
=
1
n
[
(
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
)
2
+
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
)
2
+
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
)
2
]
]
1
/
2
d_{2}(\tilde{A}, \tilde{B})=\left[\frac{1}{2 n} \sum_{j=1}^{n}\left[\left(\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right)^{2}+\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right)^{2}+\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right)^{2}\right]\right]^{1 / 2}
d2?(A~,B~)=[2n1?j=1∑n?[(μA~?(xj?)?μB~?(xj?))2+(νA~?(xj?)?νB~?(xj?))2+(πA~?(xj?)?πB~?(xj?))2]]1/2
??切比雪夫距离:
d
+
∞
(
A
~
,
B
~
)
=
max
?
1
?
j
?
n
{
∣
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
∣
+
∣
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
∣
+
∣
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
∣
2
n
}
d_{+\infty}(\tilde{A}, \tilde{B})=\max _{1 \leqslant j \leqslant n}\left\{\frac{\left|\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right|+\left|\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right|+\left|\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right|}{2 n}\right\}
d+∞?(A~,B~)=1?j?nmax?{2n∣μA~?(xj?)?μB~?(xj?)∣+∣νA~?(xj?)?νB~?(xj?)∣+∣πA~?(xj?)?πB~?(xj?)∣?}
??加权闵可夫斯基距离:
d
ˉ
q
(
A
~
,
B
~
)
=
[
1
2
∑
j
=
1
n
ω
j
[
(
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
)
q
+
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
)
q
+
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
)
q
]
]
1
/
q
\bar{d}_{q}(\tilde{A}, \tilde{B})=\left[\frac{1}{2} \sum_{j=1}^{n} \omega_{j}\left[\left(\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right)^{q}+\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right)^{q}+\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right)^{q}\right]\right]^{1 / q}
dˉq?(A~,B~)=[21?j=1∑n?ωj?[(μA~?(xj?)?μB~?(xj?))q+(νA~?(xj?)?νB~?(xj?))q+(πA~?(xj?)?πB~?(xj?))q]]1/q
??加权汉明距离:
d
ˉ
1
(
A
~
,
B
~
)
=
1
2
∑
j
=
1
n
ω
j
[
∣
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
∣
+
∣
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
∣
+
∣
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
∣
]
\bar{d}_{1}(\tilde{A}, \tilde{B})=\frac{1}{2} \sum_{j=1}^{n} \omega_{j}\left[\left|\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right|+\mid\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)|+|\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right) \mid\right]\right.\right.
dˉ1?(A~,B~)=21?j=1∑n?ωj?[∣μA~?(xj?)?μB~?(xj?)∣+∣(νA~?(xj?)?νB~?(xj?)∣+∣(πA~?(xj?)?πB~?(xj?)∣]
??加权欧几里得距离:
d
ˉ
2
(
A
~
,
B
~
)
=
[
1
2
∑
j
=
1
n
ω
j
[
(
μ
λ
(
x
j
)
?
μ
B
~
(
x
j
)
)
2
+
(
ν
A
~
(
x
j
)
?
ν
B
~
(
x
j
)
)
2
+
(
π
A
~
(
x
j
)
?
π
B
~
(
x
j
)
)
2
]
]
1
/
2
\bar{d}_{2}(\tilde{A}, \tilde{B})=\left[\frac{1}{2} \sum_{j=1}^{n} \omega_{j}\left[\left(\mu_{\lambda}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right)^{2}+\left(\nu_{\tilde{A}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right)^{2}+\left(\pi_{\tilde{A}}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right)^{2}\right]\right]^{1 / 2}
dˉ2?(A~,B~)=[21?j=1∑n?ωj?[(μλ?(xj?)?μB~?(xj?))2+(νA~?(xj?)?νB~?(xj?))2+(πA~?(xj?)?πB~?(xj?))2]]1/2
??加权切比雪夫距离:
d
ˉ
+
∞
(
A
~
,
B
~
)
=
max
?
1
?
j
?
n
{
ω
j
(
∣
μ
A
~
(
x
j
)
?
μ
B
~
(
x
j
)
∣
+
∣
ν
λ
~
(
x
j
)
?
ν
B
~
(
x
j
)
∣
+
∣
π
λ
(
x
j
)
?
π
B
~
(
x
j
)
∣
)
2
}
\bar{d}_{+\infty}(\tilde{A}, \tilde{B})=\max _{1 \leqslant j \leqslant n}\left\{\frac{\omega_{j}\left(\left|\mu_{\tilde{A}}\left(x_{j}\right)-\mu_{\tilde{B}}\left(x_{j}\right)\right|+\left|\nu_{\tilde{\lambda}}\left(x_{j}\right)-\nu_{\tilde{B}}\left(x_{j}\right)\right|+\left|\pi_{\lambda}\left(x_{j}\right)-\pi_{\tilde{B}}\left(x_{j}\right)\right|\right)}{2}\right\}
dˉ+∞?(A~,B~)=1?j?nmax?{2ωj?(∣μA~?(xj?)?μB~?(xj?)∣+∣∣?νλ~?(xj?)?νB~?(xj?)∣∣?+∣πλ?(xj?)?πB~?(xj?)∣)?}
??计算代码(python)如下:
import numpy as np
A = [[0.6,0.7,0.7,0.8,0.8,0.6],[0.4,0.2,0.2,0.1,0.2,0.3]]
B = [[0.6,0.6,0.6,0.7,0.7,0.7],[0.3,0.3,0.2,0.2,0.2,0.2]]
A = np.array(A)
B = np.array(B)
def get_distance(arr_A,arr_B,dist_type,q_value=0):
if dist_type == 'q':
temp = 0
for i in range(arr_A.shape[1]):
temp += np.power(arr_A[0][i] - arr_B[0][i],q_value) + \
np.power(arr_A[1][i] - arr_B[1][i],q_value) + \
np.power(arr_B[0][i] + arr_B[1][i] - arr_A[0][i] - arr_A[1][i],q_value)
return np.power(temp/(2*arr_A.shape[1]),1/q_value)
if dist_type == '1':
temp = 0
for i in range(arr_A.shape[1]):
temp += np.abs(arr_A[0][i] - arr_B[0][i]) + \
np.abs(arr_A[1][i] - arr_B[1][i]) + \
np.abs(arr_B[0][i] + arr_B[1][i] - arr_A[0][i] - arr_A[1][i])
return temp/(2*arr_A.shape[1])
if dist_type == '2':
temp = 0
for i in range(arr_A.shape[1]):
temp += np.power(arr_A[0][i] - arr_B[0][i],2) + \
np.power(arr_A[1][i] - arr_B[1][i],2) + \
np.power(arr_B[0][i] + arr_B[1][i] - arr_A[0][i] - arr_A[1][i],2)
return np.power(temp/(2*arr_A.shape[1]),1/2)
if dist_type == 'infty':
temp_max = 0
for i in range(arr_A.shape[1]):
value = np.abs(arr_A[0][i] - arr_B[0][i]) + \
np.abs(arr_A[1][i] - arr_B[1][i]) + \
np.abs(arr_B[0][i] + arr_B[1][i] - arr_A[0][i] - arr_A[1][i])
if value/(2*arr_A.shape[1]) > temp_max:
temp_max = value/(2*arr_A.shape[1])
return temp_max
def get_similarity(arr_A,arr_B,sim_type,q_value=0):
return 1 - get_distance(arr_A,arr_B,sim_type,q_value)
print('=========闵可夫斯基距离与相似度==========')
d_q = get_distance(A,B,'q',q_value=5)
print("直觉模糊集A和直觉模糊集B之间的闵可夫斯基距离为:{}\t相似度为:{}".format(d_q,1-d_q))
print('\n')
print('=========汉明距离与相似度==========')
d_1 = get_distance(A,B,'1')
print("直觉模糊集A和直觉模糊集B之间的汉明距离为:{}\t相似度为:{}".format(d_1,1-d_1))
print('\n')
print('=========欧几里得距离与相似度==========')
d_2 = get_distance(A,B,'2')
print("直觉模糊集A和直觉模糊集B之间的欧几里得距离为:{}\t相似度为:{}".format(d_2,1-d_2))
print('\n')
print('=========切比雪夫距离与相似度==========')
d_infty = get_distance(A,B,'infty')
print("直觉模糊集A和直觉模糊集B之间的切比雪夫距离为:{}\t相似度为:{}".format(d_infty,1-d_infty))
print('\n')
??计算结果如下:
=
=
=
=
=
=
=
=
=
闵
可
夫
斯
基
距
离
与
相
似
度
=
=
=
=
=
=
=
=
=
=
=========闵可夫斯基距离与相似度==========
=========闵可夫斯基距离与相似度========== 直觉模糊集A和直觉模糊集B之间的闵可夫斯基距离为:6.464989264213939e-05 相似度为:0.9999353501073579
=
=
=
=
=
=
=
=
=
汉
明
距
离
与
相
似
度
=
=
=
=
=
=
=
=
=
=
========= 汉明距离与相似度 ==========
=========汉明距离与相似度========== 直觉模糊集A和直觉模糊集B之间的汉明距离为:0.10000000000000003 相似度为:0.8999999999999999
=
=
=
=
=
=
=
=
=
欧
几
里
得
距
离
与
相
似
度
=
=
=
=
=
=
=
=
=
=
=========欧几里得距离与相似度==========
=========欧几里得距离与相似度========== 直觉模糊集A和直觉模糊集B之间的欧几里得距离为:0.10000000000000002 相似度为:0.9
=
=
=
=
=
=
=
=
=
切
比
雪
夫
距
离
与
相
似
度
=
=
=
=
=
=
=
=
=
=
=========切比雪夫距离与相似度==========
=========切比雪夫距离与相似度========== 直觉模糊集A和直觉模糊集B之间的切比雪夫距离为:0.016666666666666687 相似度为:0.9833333333333333
2.4 直觉模糊数及其运算
??为方便起见,称
α
~
=
(
μ
α
~
,
ν
α
~
)
\tilde{\alpha}=(\mu_{\tilde{\alpha}},\nu_{\tilde{\alpha}})
α~=(μα~?,να~?)为直觉模糊数,其中
μ
α
~
∈
[
0
,
1
]
,
ν
α
~
∈
[
0
,
1
]
,
μ
α
~
+
ν
α
~
≤
1
\mu_{\tilde{\alpha}} \in [0,1], \nu_{\tilde{\alpha}} \in [0,1], \mu_{\tilde{\alpha}} + \nu_{\tilde{\alpha}} \leq 1
μα~?∈[0,1],να~?∈[0,1],μα~?+να~?≤1 显然,
α
~
+
=
(
1
,
0
)
{\tilde{\alpha}}^{+}=(1,0)
α~+=(1,0)是最大的直觉模糊数,而
α
~
?
=
(
1
,
0
)
{\tilde{\alpha}}^{-}=(1,0)
α~?=(1,0)是最小的直觉模糊数。
定义1.12 ??设
α
~
1
=
(
μ
α
~
1
,
ν
α
~
1
)
{\tilde{\alpha}}_{1} = (\mu_{\tilde{\alpha}_{1}},\nu_{\tilde{\alpha}_{1}})
α~1?=(μα~1??,να~1??),
α
~
2
=
(
μ
α
~
2
,
ν
α
~
2
)
{\tilde{\alpha}}_{2} = (\mu_{\tilde{\alpha}_{2}},\nu_{\tilde{\alpha}_{2}})
α~2?=(μα~2??,να~2??)为两个直觉模糊数,
s
(
α
~
1
)
=
μ
α
~
1
?
ν
α
~
1
s({\tilde{\alpha}}_{1})=\mu_{\tilde{\alpha}_{1}} - \nu_{\tilde{\alpha}_{1}}
s(α~1?)=μα~1???να~1??,
s
(
α
~
2
)
=
μ
α
~
2
?
ν
α
~
2
s({\tilde{\alpha}}_{2})=\mu_{\tilde{\alpha}_{2}} - \nu_{\tilde{\alpha}_{2}}
s(α~2?)=μα~2???να~2??分别为
α
~
1
{\tilde{\alpha}}_{1}
α~1?和
α
~
2
{\tilde{\alpha}}_{2}
α~2?的得分值,
h
(
α
~
1
)
=
μ
α
~
1
+
ν
α
~
1
h({\tilde{\alpha}}_{1})=\mu_{\tilde{\alpha}_{1}} + \nu_{\tilde{\alpha}_{1}}
h(α~1?)=μα~1??+να~1??,
h
(
α
~
2
)
=
μ
α
~
2
+
ν
α
~
2
h({\tilde{\alpha}}_{2})=\mu_{\tilde{\alpha}_{2}} + \nu_{\tilde{\alpha}_{2}}
h(α~2?)=μα~2??+να~2??分别为
α
~
1
{\tilde{\alpha}}_{1}
α~1?和
α
~
2
{\tilde{\alpha}}_{2}
α~2?的精确度,则
??(1)?若
s
(
α
~
1
)
<
s
(
α
~
2
)
s({\tilde{\alpha}}_{1}) \lt s({\tilde{\alpha}}_{2})
s(α~1?)<s(α~2?),则
α
~
1
{\tilde{\alpha}}_{1}
α~1?小于
α
~
2
{\tilde{\alpha}}_{2}
α~2?,即
α
~
1
<
α
~
2
{\tilde{\alpha}}_{1} \lt {\tilde{\alpha}}_{2}
α~1?<α~2?;
??(2)?若
s
(
α
~
1
)
=
s
(
α
~
2
)
s({\tilde{\alpha}}_{1}) = s({\tilde{\alpha}}_{2})
s(α~1?)=s(α~2?),则 ????①?若
h
(
α
~
1
)
=
h
(
α
~
2
)
h({\tilde{\alpha}}_{1}) = h({\tilde{\alpha}}_{2})
h(α~1?)=h(α~2?),则
α
~
1
=
α
~
2
{\tilde{\alpha}}_{1} = {\tilde{\alpha}}_{2}
α~1?=α~2?; ????②?若
h
(
α
~
1
)
≤
h
(
α
~
2
)
h({\tilde{\alpha}}_{1}) \le h({\tilde{\alpha}}_{2})
h(α~1?)≤h(α~2?),则
α
~
1
≤
α
~
2
{\tilde{\alpha}}_{1} \le {\tilde{\alpha}}_{2}
α~1?≤α~2?; ????③?若
h
(
α
~
1
)
>
h
(
α
~
2
)
h({\tilde{\alpha}}_{1}) \gt h({\tilde{\alpha}}_{2})
h(α~1?)>h(α~2?),则
α
~
1
>
α
~
2
{\tilde{\alpha}}_{1} \gt {\tilde{\alpha}}_{2}
α~1?>α~2?。
定理1.6 ??设
α
~
1
=
(
μ
α
~
1
,
ν
α
~
1
)
{\tilde{\alpha}}_{1}=(\mu_{{\tilde{\alpha}}_{1}},\nu_{{\tilde{\alpha}}_{1}})
α~1?=(μα~1??,να~1??),
α
~
2
=
(
μ
α
~
2
,
ν
α
~
2
)
{\tilde{\alpha}}_{2}=(\mu_{{\tilde{\alpha}}_{2}},\nu_{{\tilde{\alpha}}_{2}})
α~2?=(μα~2??,να~2??)为两个直觉模糊数,则
α
~
1
≤
α
~
2
?
μ
α
~
1
≤
μ
α
~
2
且
ν
α
~
1
≥
ν
α
~
2
{\tilde{\alpha}}_{1} \leq {\tilde{\alpha}}_{2} \Leftarrow \mu_{{\tilde{\alpha}}_{1}} \leq \mu_{{\tilde{\alpha}}_{2}}且\nu_{{\tilde{\alpha}}_{1}} \geq \nu_{{\tilde{\alpha}}_{2}}
α~1?≤α~2??μα~1??≤μα~2??且να~1??≥να~2?? 定义1.13 ??设
α
~
=
(
μ
α
~
,
ν
α
~
)
{\tilde{\alpha}}=(\mu_{{\tilde{\alpha}}},\nu_{{\tilde{\alpha}}})
α~=(μα~?,να~?),
α
~
1
=
(
μ
α
~
1
,
ν
α
~
1
)
{\tilde{\alpha}}_{1}=(\mu_{{\tilde{\alpha}}_{1}},\nu_{{\tilde{\alpha}}_{1}})
α~1?=(μα~1??,να~1??),
α
~
2
=
(
μ
α
~
2
,
ν
α
~
2
)
{\tilde{\alpha}}_{2}=(\mu_{{\tilde{\alpha}}_{2}},\nu_{{\tilde{\alpha}}_{2}})
α~2?=(μα~2??,να~2??)为直觉模糊数,则
??(1)?
α
~
 ̄
=
(
ν
α
~
,
μ
α
~
)
\overline{\tilde{\alpha}}=\left(\nu_{\tilde{\alpha}}, \mu_{\tilde{\alpha}}\right)
α~=(να~?,μα~?);
??(2)?
α
~
1
∩
α
~
2
=
(
min
?
{
μ
α
~
1
,
μ
α
~
2
}
,
max
?
{
ν
α
~
1
,
ν
α
~
2
,
}
)
\tilde{\alpha}_{1} \cap \tilde{\alpha}_{2} = \left({\min \left\{\mu_{\tilde{\alpha}_{1}}, \mu_{\tilde{\alpha}_{2}}\right\}}, {\max \left\{\nu_{\tilde{\alpha}_{1}}, \nu_{\tilde{\alpha}_{2}},\right\}}\right)
α~1?∩α~2?=(min{μα~1??,μα~2??},max{να~1??,να~2??,});
??(3)?
α
~
1
∪
α
~
2
=
(
max
?
{
μ
α
~
1
,
μ
α
~
2
}
,
min
?
{
ν
α
~
1
,
ν
α
~
2
}
)
\tilde{\alpha}_{1} \cup \tilde{\alpha}_{2}=\left(\max \left\{\mu_{\tilde{\alpha}_{1}}, \mu_{\tilde{\alpha}_{2}}\right\}, \min \left\{\nu_{\tilde{\alpha}_{1}}, \nu_{\tilde{\alpha}_{2}}\right\}\right)
α~1?∪α~2?=(max{μα~1??,μα~2??},min{να~1??,να~2??});
??(4)?
α
~
1
⊕
α
~
2
=
(
μ
α
~
1
+
μ
α
~
2
?
μ
α
~
1
μ
α
~
2
,
ν
α
~
1
ν
α
~
2
)
\color{red}{\tilde{\alpha}_{1} \oplus \tilde{\alpha}_{2}=\left(\mu_{\tilde{\alpha}_{1}}+\mu_{\tilde{\alpha}_{2}}-\mu_{\tilde{\alpha}_{1}} \mu_{\tilde{\alpha}_{2}}, \nu_{\tilde{\alpha}_{1}} \nu_{\tilde{\alpha}_{2}}\right)}
α~1?⊕α~2?=(μα~1??+μα~2???μα~1??μα~2??,να~1??να~2??);
??(5)?
α
~
1
?
α
~
2
=
(
μ
α
~
1
μ
α
~
2
,
ν
α
~
1
+
ν
α
~
2
?
ν
α
~
1
ν
α
~
2
)
\color{red}{\tilde{\alpha}_{1} \otimes \tilde{\alpha}_{2}=\left(\mu_{\tilde{\alpha}_{1}} \mu_{\tilde{\alpha}_{2}}, \nu_{\tilde{\alpha}_{1}}+\nu_{\tilde{\alpha}_{2}}-\nu_{\tilde{\alpha}_{1}} \nu_{\tilde{\alpha}_{2}}\right)}
α~1??α~2?=(μα~1??μα~2??,να~1??+να~2???να~1??να~2??);
??(6)?
λ
α
~
=
(
1
?
(
1
?
μ
α
~
)
)
λ
,
v
α
~
λ
)
,
λ
≥
0
\color{red}{\left.\lambda \tilde{\alpha}=\left(1-\left(1-\mu_{\tilde{\alpha}}\right)\right)^{\lambda}, v_{\tilde{\alpha}}^{\lambda}\right), \lambda \geq 0}
λα~=(1?(1?μα~?))λ,vα~λ?),λ≥0;
??(7)?
α
~
λ
=
(
μ
α
~
λ
,
1
?
(
1
?
ν
α
~
)
λ
)
,
λ
≥
0
\color{red}{\tilde{\alpha}^{\lambda}=\left(\mu_{\tilde{\alpha}}^{\lambda}, 1-\left(1-\nu_{\tilde{\alpha}}\right)^{\lambda}\right), \lambda \geq 0}
α~λ=(μα~λ?,1?(1?να~?)λ),λ≥0。
??根据直觉模糊数的定义,可以证明以下两个定理。
定理1.7 ??设
α
~
=
(
μ
α
~
,
ν
α
~
)
{\tilde{\alpha}}=(\mu_{{\tilde{\alpha}}},\nu_{{\tilde{\alpha}}})
α~=(μα~?,να~?),
α
~
1
=
(
μ
α
~
1
,
ν
α
~
1
)
{\tilde{\alpha}}_{1}=(\mu_{{\tilde{\alpha}}_{1}},\nu_{{\tilde{\alpha}}_{1}})
α~1?=(μα~1??,να~1??),
α
~
2
=
(
μ
α
~
2
,
ν
α
~
2
)
{\tilde{\alpha}}_{2}=(\mu_{{\tilde{\alpha}}_{2}},\nu_{{\tilde{\alpha}}_{2}})
α~2?=(μα~2??,να~2??)为直觉模糊数,则
α
~
1
⊕
α
~
2
\tilde{\alpha}_{1} \oplus \tilde{\alpha}_{2}
α~1?⊕α~2?、
α
~
1
?
α
~
2
\tilde{\alpha}_{1} \otimes \tilde{\alpha}_{2}
α~1??α~2?、
λ
α
~
\lambda \tilde{\alpha}
λα~和
α
~
λ
(
λ
>
0
)
\tilde{\alpha}^{\lambda}(\lambda>0)
α~λ(λ>0)均为直觉模糊数。
定理1.8 ??设
α
~
=
(
μ
α
~
,
ν
α
~
)
{\tilde{\alpha}}=(\mu_{{\tilde{\alpha}}},\nu_{{\tilde{\alpha}}})
α~=(μα~?,να~?),
α
~
1
=
(
μ
α
~
1
,
ν
α
~
1
)
{\tilde{\alpha}}_{1}=(\mu_{{\tilde{\alpha}}_{1}},\nu_{{\tilde{\alpha}}_{1}})
α~1?=(μα~1??,να~1??),
α
~
2
=
(
μ
α
~
2
,
ν
α
~
2
)
{\tilde{\alpha}}_{2}=(\mu_{{\tilde{\alpha}}_{2}},\nu_{{\tilde{\alpha}}_{2}})
α~2?=(μα~2??,να~2??)为直觉模糊数,
λ
,
λ
1
,
λ
2
>
0
\lambda, \lambda_{1}, \lambda_{2}>0
λ,λ1?,λ2?>0,则
??(1)?
α
~
1
⊕
α
~
2
=
α
~
2
⊕
α
~
1
\tilde{\alpha}_{1} \oplus \tilde{\alpha}_{2}=\tilde{\alpha}_{2} \oplus \tilde{\alpha}_{1}
α~1?⊕α~2?=α~2?⊕α~1?;
??(2)?
α
~
1
?
α
~
2
=
α
~
2
?
α
~
1
\tilde{\alpha}_{1} \otimes \tilde{\alpha}_{2}=\tilde{\alpha}_{2} \otimes \tilde{\alpha}_{1}
α~1??α~2?=α~2??α~1?;
??(3)?
λ
(
α
~
1
⊕
α
~
2
)
=
λ
α
~
1
+
λ
α
~
2
\lambda\left(\tilde{\alpha}_{1} \oplus \tilde{\alpha}_{2}\right)=\lambda \tilde{\alpha}_{1}+\lambda \tilde{\alpha}_{2}
λ(α~1?⊕α~2?)=λα~1?+λα~2?;
??(4)?
(
α
~
1
?
α
~
2
)
λ
=
α
~
1
λ
?
α
~
2
λ
\left(\tilde{\alpha}_{1} \otimes \tilde{\alpha}_{2}\right)^{\lambda}=\tilde{\alpha}_{1}^{\lambda} \otimes \tilde{\alpha}_{2}^{\lambda}
(α~1??α~2?)λ=α~1λ??α~2λ?;
??(5)?
λ
1
α
~
⊕
λ
2
α
~
=
(
λ
1
+
λ
2
)
α
~
\lambda_{1} \tilde{\alpha} \oplus \lambda_{2} \tilde{\alpha}=\left(\lambda_{1}+\lambda_{2}\right) \tilde{\alpha}
λ1?α~⊕λ2?α~=(λ1?+λ2?)α~;
??(6)?
α
~
λ
1
?
α
~
λ
2
=
α
~
(
λ
1
+
λ
2
)
\tilde{\alpha}^{\lambda_{1}} \otimes \tilde{\alpha}^{\lambda_{2}}=\tilde{\alpha}^{\left(\lambda_{1}+\lambda_{2}\right)}
α~λ1??α~λ2?=α~(λ1?+λ2?)。
|