5

I need to classify objects using fuzzy logic. Each object is characterized by 4 features - {size, shape, color, texture}. Each feature is fuzzified by linguistic terms and some membership function. The problem is I am unable to understand how to defuzzify such that I may know which class an unknown object belongs to. Using the Mamdani Max-Min inference, can somebody help in solving this issue?

Objects = {Dustbin, Can, Bottle, Cup} or denoted as {1,2,3,4} respectively. The fuzzy sets for each feature is :

Feature : Size

$\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)

Shape:

$\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)

Feature : Color

$\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

Feature : Texture

$\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

The If then else rules for classification are

R1: IF object is large in size AND cylindrical shape AND greenish in color AND coarse in texture THEN object is Dustbin

or in tabular form just to save space

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

Then, there is an unknown feature with crisp values X = {12cm, 52,120,11}. How do I classify it? Or is my understanding incorrect, that I need to reformulate the entire thing?

halfer
  • 19,824
  • 17
  • 99
  • 186
SKM
  • 959
  • 2
  • 19
  • 45
  • Have you considered using a Bays Net instead of Fuzzy Logic? At least there there is a clear physical meaning to everything. – mdaoust Jun 12 '14 at 01:45

2 Answers2

0

Fuzzy logic means that every pattern belongs to a class up to a level. In other words, the output of the algorithm for every pattern could be a vector of let's say percentages of similarity to each class that sum up to unity. Then the decision for a class could be taken by checking a threshold. This means that the purpose of fuzzy logic is to quantify the uncertainty. If you need a decision for your case, a simple minimum distance classifier or a majority vote should be enough. Otherwise, define again your problem by taking the "number factor" into consideration.

fyts
  • 493
  • 5
  • 12
  • Thank you for your reply but it is not clear and could you please elaborate on how to make a decision?Should the defuzzification be considered?How do I define membership function for the classes in order to say that a particular feature belongs to a class. This is not clear to me.So, Dustbin is a class then how to represent membership function, if at all required, and how to classify? – SKM Jul 02 '14 at 17:40
0

One possible approach could be to define centroids for each feature's distinct attribute, for example, Large_size=15cm and Small_size=7cm. The membership function could be then defined as a function of the distance from these centroids. Then you could do the following: 1) Calculate the euclidean difference * a Gaussian or Butterworth kernel (in order to capture the range around the centroid) for every feature. Prepare a kernel for every class, for example, dustbin as a target needs large size, coarse texture etc. 2) Calculate the product of all the above (this is a Naive Bayes approach). Fuzzy logic ends here. 3) Then, you could assign the pattern to the class with the highest value of the membership function. Sorry for taking too long to answer, hope this will help.

fyts
  • 493
  • 5
  • 12
  • Sorry, I noticed the answer today. I am unable to understand how the class labels are assigned. In general we say that when a neuron outputs [100] as Class 1; or [001] as Class 2. How to do for fuzzy case when you say that the pattern is assigned to the class with the highest value of the membership function. – SKM Jul 28 '14 at 00:12