分类中的模糊逻辑示例

SKM*_*SKM 5 matlab fuzzy-logic fuzzy-comparison

我需要使用模糊逻辑对对象进行分类。每个对象都有 4 个特征 - {大小、形状、颜色、纹理}。每个特征都通过语言术语和一些隶属函数进行模糊化。问题是我无法理解如何去模糊化,以便我可以知道未知对象属于哪个类。使用 Mamdani Max-Min 推理,有人可以帮助解决这个问题吗?

Objects = {Dustbin, Can, Bottle, Cup} 或分别表示为 {1,2,3,4}。每个特征的模糊集是:

特点:尺寸

$\tilde{Size_{Large}}$ = {1//1,1/2,0/3,0.6/4}  for crisp values in range 10cm - 20 cm

$\tilde{Size_{Small}}$ = {0/1,0/2,1/3,0.4/4}  (4cm - 10cm)
Run Code Online (Sandbox Code Playgroud)

形状:

$\tilde{Shape_{Square}}$ = {0.9/1, 0/2,0/3,0/4}  for crisp values in range 50-100

$\tilde{Shape_{Cylindrical}}$ = {0.1/1, 1/2,1/3,1/4}  (10-40)
Run Code Online (Sandbox Code Playgroud)

特点 : 颜色

$\tilde{Color_{Reddish}}$ = {0/1, 0.8/2, 0.6/3,0.3/4}  say red values in between 10-50 (not sure, assuming)

$\tilde{Color_{Greenish}}$ = {1/1, 0.2/2, 0.4/3, 0.7/4}  say color values in 100-200
Run Code Online (Sandbox Code Playgroud)

特点:纹理

$\tilde{Tex_{Coarse}}$ = {0.2/1, 0.2/2,0/3,0.5/4}  if texture crisp values 10-20

$\tilde{Tex_{Shiny}}$ = {0.8/1, 0.8/2, 1/3, 0.5/4}  30-40
Run Code Online (Sandbox Code Playgroud)

If then else 分类规则是

R1:如果物体尺寸大且呈圆柱形且颜色呈绿色且质地粗糙则物体为垃圾桶

或以表格形式只是为了节省空间

Object type  Size   Shape          Color        Texture
Dustbin :   Large  cylindrical       greenish   coarse
Can :       small  cylindrical       reddish    shiny
Bottle:     small  cylindrical        reddish    shiny
Cup :       small  cylindrical       greenish   shiny
Run Code Online (Sandbox Code Playgroud)

然后,有一个未知特征的清晰值 X = {12cm, 52,120,11}。我该如何分类?还是我的理解不正确,我需要重新表述整个事情?

小智 0

模糊逻辑意味着每个模式在某个级别上都属于一个类。换句话说,每个模式的算法的输出可能是一个向量,比方说每个类的相似度百分比总和为一。然后可以通过检查阈值来决定类别。这意味着模糊逻辑的目的是量化不确定性。如果您需要针对您的案例做出决定,简单的最小距离分类器或多数投票就足够了。否则,请考虑“数字因素”来再次定义您的问题。