Fuzzy Logic Products
Fuzzy Logic
*What's New in Version 2?
*Sample Images
*Classifying Houses
*Representing Age
*Finding the Disjunctive Sum
*Natural Numbers
*Fuzzy Hedges
*Distance Relation
*Choosing a Job
<Digital Fuzzy Sets
*Image Processing
*Who's It For?
*Download Product
*Buy Online
*Technical FAQs
*For More Information
*Higher Education Solutions
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

Example 8: Digital Fuzzy Sets

Problem. Suppose you are asked to compare fuzzy sets  to digital fuzzy sets.

Solution. Below is an example of a set with 6 digital membership functions defined over the range from 0 to 20.

SetOptions[FuzzySet, UniversalSpace -> {0, 20, 1}] ;
SetOptions[FuzzyPlot, ShowDots -> True] ;

Fset1 = FuzzyTrapezoid[2, 12, 12, 18] ;

DSet2 = ToDigital[Fset1, 2] ; DSet3 = ToDigital[Fset1, 3] ;
DSet4 = ToDigital[Fset1, 4] ; DSet5 = ToDigital[Fset1, 5] ; DSet6 = ToDigital[Fset1, 6] ;

Aukasiewicz sets can be viewed and manipulated in the same manner as infinite valued fuzzy sets.  For a  graphic representation of the above set, execute the following fuzzy plot command.

Block[{$DisplayFunction = Identity}, graphic = FuzzyPlot[Fset1]
; graphic2 = FuzzyPlot[Fset1, DSet2] ; graphic3 = FuzzyPlot[Fset1, DSet3] ; graphic4 = FuzzyPlot[Fset1, DSet4] ;
graphic5 = FuzzyPlot[Fset1, DSet5] ; graphic6 = FuzzyPlot[Fset1, DSet6]] ;

Show[GraphicsArray[{{graphic, graphic2}, {graphic3, graphic4},
{graphic5, graphic6}}], Frame -> True] ;


Let us compare the discrete and digital form of our fuzzy sets using the concept of the Hamming distance.

{HammingDistance[Fset1, DSet2], HammingDistance[Fset1, DSet3],
HammingDistance[Fset1, DSet4], HammingDistance[Fset1, DSet5], HammingDistance[Fset1, DSet6]} // N

{4.`, 1.8666666666666667`, 1.3333333333333333`,
0.9333333333333333`, 0.8`}

As you might expect, as n goes to infinity,  Aukasiewicz sets become fuzzy set.

Any questions about topics on this page? Click here to get an individual response.

Translate this page: