New Feature Documentation
 | Download as a Mathematica
notebook.
|
New Definition of Universal Space
The first thing to note is that originally the universal space for fuzzy sets in
Fuzzy Logic was defined
only on the integers. In the new version, the universal space for fuzzy sets and
fuzzy relations is defined with three
numbers. The first two numbers specify the start and end of the universal space,
and the third argument specifies the
increment between elements. This gives the user more flexibility in choosing the
universal space.

![SetOptions[FuzzySet,
UniversalSpace -> {0, 100, 1}] ;](HTMLFiles/version2_2.gif)
New Membership Functions
A number of new functions and options were added for creating membership functions.
Here is a demonstration of the additions.
Bell-Shaped Fuzzy Sets
FuzzyBell[c, w, s, opts] returns
a bell-shaped fuzzy set centered at
c with crossover points at c - w and c + w and with a slope of
s / 2w at the crossover points.
![FS1 = FuzzyBell[50, 20, 4] ;](HTMLFiles/version2_3.gif)
![FuzzyPlot[FS1, PlotJoined -> True] ;](HTMLFiles/version2_4.gif)
![[Graphics:HTMLFiles/version2_5.gif]](HTMLFiles/version2_5.gif)
Sigmoidal Fuzzy Sets
FuzzySigmoid[c, s, opts] returns a sigmoidal
fuzzy set where s
controls the slope at the crossover point c. A positive slope gives a sigmoidal
fuzzy set, which opens to the
right, and a negative slope gives a fuzzy set, which opens to the left.
![FS2 = FuzzySigmoid[50, .2] ;](HTMLFiles/version2_6.gif)
![FuzzyPlot[FS2, PlotJoined -> True] ;](HTMLFiles/version2_7.gif)
![[Graphics:HTMLFiles/version2_8.gif]](HTMLFiles/version2_8.gif)
![FS3 = FuzzySigmoid[50, -.2] ;](HTMLFiles/version2_9.gif)
![FuzzyPlot[FS3, PlotJoined -> True] ;](HTMLFiles/version2_10.gif)
![[Graphics:HTMLFiles/version2_11.gif]](HTMLFiles/version2_11.gif)
Double-Sided Gaussian Fuzzy Sets
FuzzyTwoGaussian[mu1, sigma1, mu2, sigma2,
opts] returns a two-sided Gaussian fuzzy set with centers at mu1 and
mu2 and widths of sigma1 and sigma2. Between the
two means, the fuzzy set has a membership grade of 1.
![FS4 = FuzzyTwoGaussian[40, 8, 50, 25] ;](HTMLFiles/version2_12.gif)
![FuzzyPlot[FS4, PlotJoined -> True] ;](HTMLFiles/version2_13.gif)
![[Graphics:HTMLFiles/version2_14.gif]](HTMLFiles/version2_14.gif)
Digital Fuzzy Sets
DigitalSet[a, b, c, d, (h), opts]
returns a digital fuzzy set with the number of membership grades equal to n,
where n is set by an option for this
function. The universal space and the value of n may be defined using
UniversalSpace and the
n option; otherwise the default universal space and the default n value are given.
The values of the
membership grades increase linearly from a to b, then are equal to the
closest possible value of h
from b to c, and linearly decrease from c to d.
Arguments a, b, c, and
d must be in increasing order, and h must be a value between 0 and 1
inclusive. If a value for h
is not given, it defaults to 1. In the following example, you can create a fuzzy set
with n set to 5. This means
you will get an L5 fuzzy set or a fuzzy set with five possible membership grades.
![D1 = DigitalSet[1, 20, 40, 78, Levels -> 5] ;](HTMLFiles/version2_15.gif)
![FuzzyPlot[D1, Crisp -> True] ;](HTMLFiles/version2_16.gif)
![[Graphics:HTMLFiles/version2_17.gif]](HTMLFiles/version2_17.gif)
ChopValue Option
An option that allows you to specify a Chop value to the function was
added to the functions FuzzyGaussian,
FuzzyBell, FuzzySigmoid, FuzzyTwoGaussian, and
CreateFuzzySets. Any
membership grades less than this value are taken as zero. When working with
Gaussian-type functions, every element has
a membership grade, and it is often the case that many of the elements have very
small membership grades. Chopping off
these elements allows for more compact fuzzy sets and quicker calculations. It also
aids in creating fuzzy graphs,
which are described later. The following example demonstrates the option
ChopValue.
![FS5 = FuzzyGaussian [20, 5,
UniversalSpace -> {0, 40, 1}]](HTMLFiles/version2_18.gif)
![FuzzySet[{{0, 1.125351747192592`*^-7}, {1,
5.355347802793108`*^-7}, {2, 2.3525752000097718`*^-6}, {3, 9.540162873079237`*^-6},
{4, 0.000035712849641635225`}, {5,
0.0001234098040866796`}, {6, 0.000393669040655078`}, {7, 0.0011592291739045907`},
{8, 0.0031511115984444392`}, {9,
0.007907054051593435`}, {10, 0.018315638888734182`}, {11, 0.03916389509898707`},
{12, 0.07730474044329971`}, {13,
0.14085842092104486`}, {14, 0.2369277586821217`}, {15, 0.36787944117144233`},
{16, 0.5272924240430482`}, {17,
0.6976763260710308`}, {18, 0.8521437889662112`}, {19, 0.9607894391523232`},
{20, 1.`}, {21, 0.9607894391523232`}, {22,
0.8521437889662112`}, {23, 0.6976763260710308`}, {24, 0.5272924240430482`},
{25, 0.36787944117144233`}, {26,
0.2369277586821217`}, {27, 0.14085842092104486`}, {28, 0.07730474044329971`},
{29, 0.03916389509898707`}, {30,
0.018315638888734182`}, {31, 0.007907054051593435`}, {32, 0.0031511115984444392`},
{33, 0.0011592291739045907`}, {34,
0.000393669040655078`}, {35, 0.0001234098040866796`}, {36, 0.000035712849641635225`},
{37, 9.540162873079237`*^-6},
{38, 2.3525752000097718`*^-6}, {39, 5.355347802793108`*^-7},
{40, 1.125351747192592`*^-7}}, UniversalSpace -> {0,
40, 1}]](HTMLFiles/version2_19.gif)
![FS6 = FuzzyGaussian [20, 5,
UniversalSpace -> {0, 40, 1}, ChopValue -> .01]](HTMLFiles/version2_20.gif)
![FuzzySet[{{10, 0.018315638888734182`}, {11,
0.03916389509898707`}, {12, 0.07730474044329971`}, {13, 0.14085842092104486`},
{14, 0.2369277586821217`}, {15,
0.36787944117144233`}, {16, 0.5272924240430482`}, {17, 0.6976763260710308`},
{18, 0.8521437889662112`}, {19,
0.9607894391523232`}, {20, 1.`}, {21, 0.9607894391523232`}, {22, 0.8521437889662112`},
{23, 0.6976763260710308`}, {24,
0.5272924240430482`}, {25, 0.36787944117144233`}, {26, 0.2369277586821217`},
{27, 0.14085842092104486`}, {28,
0.07730474044329971`}, {29, 0.03916389509898707`}, {30, 0.018315638888734182`}},
UniversalSpace -> {0, 40, 1}]](HTMLFiles/version2_21.gif)
![Var2 = {NB, NM, NS, ZO, PS, PM, PB} = <br />
CreateFuzzySets [7,
Type -> Gaussian [4, ChopValue
-> 0.001 ], <br /> UniversalSpace ->
{0, 38, 0.5}] ;](HTMLFiles/version2_22.gif)
![FuzzyPlot [Var2, PlotJoined
-> True ] ;](HTMLFiles/version2_23.gif)
![[Graphics:HTMLFiles/version2_24.gif]](HTMLFiles/version2_24.gif)
Fuzzy Graph
Another visualization function in Fuzzy Logic is a fuzzy graph. A fuzzy
graph describes a mapping between an
input linguistic variable and an output linguistic variable. In essence, a fuzzy
graph serves as an approximation to a
function, which is described as a collection of fuzzy if-then rules. A fuzzy
graph can be used to give an idea of what a set of fuzzy rules looks like.
Demonstration
![SetOptions[FuzzySet,
UniversalSpace -> {1, 11, 1}] ;](HTMLFiles/version2_25.gif)
![Input1 = {Tiny, VerySmall,
Small, Medium, Big, VeryBig,
Huge} = {FuzzyTrapezoid[1, 1, 1, 3], FuzzyTrapezoid[1, 2, 2, 4], FuzzyTrapezoid[2, 4, 4, 6],
FuzzyTrapezoid[4, 6, 6,
8], FuzzyTrapezoid[6, 8, 8, 10], FuzzyTrapezoid[8, 10, 10, 11], FuzzyTrapezoid[9, 11, 11, 11]} ;](HTMLFiles/version2_26.gif)
![FuzzyPlot[Input1,
PlotJoined -> True] ;](HTMLFiles/version2_27.gif)
![[Graphics:HTMLFiles/version2_28.gif]](HTMLFiles/version2_28.gif)
![SetOptions[FuzzySet,
UniversalSpace -> {2, 25, 1}] ;](HTMLFiles/version2_29.gif)
![Output1 = {VeryLow, Low, Middle, High} =
{FuzzyTrapezoid[2, 4, 4, 6], FuzzyTrapezoid[4, 5, 5, 8], FuzzyGaussian[9, 3,
ChopValue -> .001], FuzzyGaussian[20,
3, ChopValue -> .001]} ;](HTMLFiles/version2_30.gif)
![FuzzyPlot[Output1,
PlotJoined -> True] ;](HTMLFiles/version2_31.gif)
![[Graphics:HTMLFiles/version2_32.gif]](HTMLFiles/version2_32.gif)

![FuzzyGraph[Rules1] ;](HTMLFiles/version2_34.gif)
![[Graphics:HTMLFiles/version2_35.gif]](HTMLFiles/version2_35.gif)
From the fuzzy graph, you can see that the single-input/single-output
fuzzy system described by
Rules1 produces a curve that is somewhat parabolic.
Defuzzifications
![MF1 = FuzzyTrapezoid[1, 6, 13, 17, UniversalSpace ->
{0, 20}] ;](HTMLFiles/version2_36.gif)
Smallest of Max (Defuzzification)
SmallestOfMax[A] returns the smallest of
maximum defuzzification of fuzzy set A.
This function also has a ShowGraph option for visualizing the
defuzzification.
![SmallestOfMax[MF1,
ShowGraph -> True, PlotJoined ->
True] ;](HTMLFiles/version2_37.gif)

![[Graphics:HTMLFiles/version2_39.gif]](HTMLFiles/version2_39.gif)
Largest of Max (Defuzzification)
LargestOfMax[A] returns the largest of maximum
defuzzification of fuzzy set A. This
function also has a ShowGraph option for visualizing the defuzzification.
![LargestOfMax[MF1,
ShowGraph -> True, PlotJoined ->
True] ;](HTMLFiles/version2_40.gif)
![[Graphics:HTMLFiles/version2_42.gif]](HTMLFiles/version2_42.gif)
Bisector of Area (Defuzzification)
BisectorOfArea[A] returns the bisector of area
defuzzification of fuzzy set A. This
function also has a ShowGraph option for visualizing the defuzzification.
![BisectorOfArea[MF1,
ShowGraph -> True, PlotJoined
-> True] ;](HTMLFiles/version2_43.gif)

![[Graphics:HTMLFiles/version2_45.gif]](HTMLFiles/version2_45.gif)
Additional Operators
Fuzzy Cardinality
FuzzyCardinality[A] returns the fuzzy cardinality
of fuzzy set A.
![FuzzyCardinality[MF1]](HTMLFiles/version2_46.gif)

Core
The function Core was included in the original version of Fuzzy Logic,
but it was named Nucleus.
Core[A] returns a list of all elements of fuzzy set
A with a membership grade equal to 1.
![Core[FS4]](HTMLFiles/version2_48.gif)

Subsethood
Subsethood[A, B] returns the degree of subsethood
of fuzzy set/fuzzy relation A in
fuzzy set/fuzzy relation B. The value returned is between 0 and 1, with values
closer to 1 indicating that the
second fuzzy set/fuzzy relation is closer to being a subset of the first fuzzy
set/fuzzy relation.
![Subsethood[FS1, FS2]](HTMLFiles/version2_50.gif)

![Subsethood[FS2, FS1]](HTMLFiles/version2_52.gif)

Hamming Distance
HammingDistance[A, B] returns the
Hamming distance from fuzzy set/fuzzy
relation A to fuzzy set/fuzzy relation B.
![HammingDistance[FS1, FS2]](HTMLFiles/version2_54.gif)

Level Set
LevelSet[A] returns the set of all alpha levels that represent
distinct alpha cuts of a fuzzy set/relation A.
![LevelSet[FS1]](HTMLFiles/version2_56.gif)

New Intersections and Unions
Yu-Type Union and Intersection
Yu[l] is an additional value for the option Type
for the union and intersection operations. The parameter l must be greater than -1.
![YuInt = Intersection[FS1, FS2, Type -> Yu[2]] ;](HTMLFiles/version2_58.gif)
![FuzzyPlot[FS1, FS2, YuInt, PlotJoined -> True] ;](HTMLFiles/version2_59.gif)
![[Graphics:HTMLFiles/version2_60.gif]](HTMLFiles/version2_60.gif)
Weber-Type Union and Intersection
Weber[l] is an additional value for the option Type
for the union and intersection operations. The parameter l must be greater than -1.
![WeUn = Union[FS1, FS2, Type -> Weber[0.5]] ;](HTMLFiles/version2_61.gif)
![FuzzyPlot[FS1, FS2, WeUn, PlotJoined -> True] ;](HTMLFiles/version2_62.gif)
![[Graphics:HTMLFiles/version2_63.gif]](HTMLFiles/version2_63.gif)
Alpha Cuts for Fuzzy Relations
One of the most important concepts of fuzzy sets/fuzzy relations is
the concept of an alpha-level set and its
variant, a strong alpha-level set. An alpha-level set of a fuzzy set/fuzzy
relation is the crisp set that contains
all the elements of universal space whose membership grades in the set/relation
are greater than or equal to the
specified value of alpha. A strong alpha-level set of the fuzzy set/fuzzy relation
is the crisp set that contains
all the elements of universal space whose membership grades in the set/relation
are greater than the specified value
of alpha. The set of all alpha levels that represent distinct alpha cuts of a fuzzy
set/fuzzy relation is called a level set of the set/relation.
![SetOptions[FuzzySet, UniversalSpace -> {0, 20, 1}]
;](HTMLFiles/version2_64.gif)
![FS1 = FuzzyTrapezoid[1, 8, 12, 17] ;](HTMLFiles/version2_65.gif)
![FS2 = FuzzyBell[5, 3, 2] ;](HTMLFiles/version2_66.gif)
![rel1 =
SetsToRelation[Min, FS1, FS2] ;](HTMLFiles/version2_67.gif)
![FuzzySurfacePlot[rel1] ;](HTMLFiles/version2_68.gif)
![[Graphics:HTMLFiles/version2_69.gif]](HTMLFiles/version2_69.gif)
![AlphaLevelSet[rel1, .2]](HTMLFiles/version2_70.gif)

![StrongAlphaLevelSet[rel1, .2]](HTMLFiles/version2_72.gif)

![LevelSet[rel1]](HTMLFiles/version2_74.gif)

Fuzzy Relation Equations
The notion of fuzzy relation equations is associated with the concept of the
max-min form of composition of binary relations.
Solve for a Fuzzy Relation
In the following example, you determine a fuzzy relation Relat1
given the system's input A and output B.
![A = FuzzySet[{{1, .2}, {2, .8}, {3, 1}}, UniversalSpace
-> {1, 3, 1}]](HTMLFiles/version2_76.gif)
![FuzzySet[{{1, 0.2`}, {2, 0.8`}, {3, 1}}, UniversalSpace
-> {1, 3, 1}]](HTMLFiles/version2_77.gif)
![B = FuzzySet[{{1, .5}, {2, .8}, {3, .6}},
UniversalSpace -> {1, 3, 1}]](HTMLFiles/version2_78.gif)
![FuzzySet[{{1, 0.5`}, {2, 0.8`}, {3, 0.6`}}, UniversalSpace
-> {1, 3, 1}]](HTMLFiles/version2_79.gif)
![Relat1 = FindFuzzyRelation[A, B]](HTMLFiles/version2_80.gif)
![FuzzyRelation[{{{1, 1}, 1}, {{1, 2}, 1}, {{1, 3}, 1}, {{2,
1}, 0.5`}, {{2, 2}, 1}, {{2, 3}, 0.6`}, {{3, 1}, 0.5`}, {{3, 2}, 0.8`}, {{3, 3}, 0.6`}},
UniversalSpace -> {{1, 3, 1}, {1, 3, 1}}]](HTMLFiles/version2_81.gif)
Solve for a Fuzzy Set
You can view a fuzzy relation as a fuzzy system. Then given its output you can
determine the input. In the following
example, apply the function FindFuzzySet to determine the input
NewA for fuzzy relation Rel2 and output B.
![Rel2 = FromMembershipMatrix[{{.7, 1, .4}, {.5, .9, .6},
{.2, .6, .3}}, {{1, 3}, {1, 3}}]](HTMLFiles/version2_82.gif)
![FuzzyRelation[{{{1, 1}, 0.7`}, {{1, 2}, 1}, {{1, 3},
0.4`}, {{2, 1}, 0.5`}, {{2, 2}, 0.9`}, {{2, 3}, 0.6`}, {{3, 1}, 0.2`}, {{3, 2}, 0.6`}, {{3, 3}, 0.3`}},
UniversalSpace -> {{1, 3, 1}, {1, 3, 1}}]](HTMLFiles/version2_83.gif)
![NewA = FindFuzzySet[Rel2, B]](HTMLFiles/version2_84.gif)
![FuzzySet[{{1, 0.5`}, {2, 0.8`}, {3, 1}}, UniversalSpace
-> {1, 3, 1}]](HTMLFiles/version2_85.gif)
Random Fuzzy Sets and Fuzzy Relations
These functions are used to create a random fuzzy set or fuzzy relation.
This type of operation might be valuable to test new functions.
Random Fuzzy Set
RandomFuzzySet[{a, b}] creates a random
fuzzy set with universal space from
a to b. By default, this function creates a random trapezoidal fuzzy set.
The option Type can
be used to create a Gaussian, Triangular, or Complete
random fuzzy set. In addition,
there is an option called Normal that produces a normal random fuzzy set
when set to True.
Just as with normal random numbers, you can seed the random number generator
to produce the same random fuzzy numbers
each time. To test the function RandomFuzzySet, try reevaluating the
function a number of times with different parameters.
![FS1 = RandomFuzzySet[{0, 30}] ;](HTMLFiles/version2_86.gif)
![FuzzyPlot[FS1] ;](HTMLFiles/version2_87.gif)
![[Graphics:HTMLFiles/version2_88.gif]](HTMLFiles/version2_88.gif)
![FS2 = RandomFuzzySet[{0, 30}, Type -> Gaussian] ;](HTMLFiles/version2_89.gif)
![FuzzyPlot[FS2] ;](HTMLFiles/version2_90.gif)
![[Graphics:HTMLFiles/version2_91.gif]](HTMLFiles/version2_91.gif)
![FS3 = RandomFuzzySet[{0, 30}, Type -> Triangular,
Normal -> True] ;](HTMLFiles/version2_92.gif)
![FuzzyPlot[FS3] ;](HTMLFiles/version2_93.gif)
![[Graphics:HTMLFiles/version2_94.gif]](HTMLFiles/version2_94.gif)
![FS3 = RandomFuzzySet[{0, 30}, Type -> Complete] ;](HTMLFiles/version2_95.gif)
![FuzzyPlot[FS3] ;](HTMLFiles/version2_96.gif)
![[Graphics:HTMLFiles/version2_97.gif]](HTMLFiles/version2_97.gif)
Random Fuzzy Relation
RandomFuzzySet[{{a1, b1},
{a2, b2}}] creates
a random fuzzy relation with a universal
space of {{a1, b1}, {a2,
b2}}. By default, this function creates a random
trapezoidal fuzzy relation. The
option Type can be used to create a Complete random
fuzzy relation. In addition, there is an
option called Normal that produces a normal random fuzzy relation
when set to True.
![fr1 = RandomFuzzyRelation[{{0, 10}, {0, 15}}] ;](HTMLFiles/version2_98.gif)
![FuzzySurfacePlot[fr1] ;](HTMLFiles/version2_99.gif)
![[Graphics:HTMLFiles/version2_100.gif]](HTMLFiles/version2_100.gif)
Fuzzy Inferencing
Rule-Based Inference
RuleBasedInference[{{A1, ... , An}, ... ,
{S1, ... , Sp}}, {Y1, ... ,
Yk}, {Ax, ... , Sx, Yx},
{a, ... , s}, opts] returns a fuzzy
set that is the result of performing rule-based inference for
multiple-input/single-output systems where {{A1, ... , An},
... , {S1, ... , Sp}} represent linguistic input
variables, {Y1, ..., Yk} is the linguistic output variable,
rules are given in a list like {Ax, ... , Sx,
Yx}, and the crisp values for the inputs are given in a list
{a, ... , s}. The values for the option
Type are Mamdani, Model, and Scaled.
Fuzzy Arithmetic
Fuzzy Multiplication and Division
FuzzyMultiply[{a1, b1, c1, d1},
{a2, b2, c2, d2}]
returns the product of the fuzzy numbers represented by the two lists. The fuzzy
product is returned as an unevaluated FuzzyTrapezoid. To evaluate
FuzzyTrapezoid, use the function ReleaseHold.
![SetOptions[FuzzySet, UniversalSpace -> {-40, 15,
1}] ;](HTMLFiles/version2_101.gif)
![Multi1 = FuzzyMultiply[{-9, 2, 2, 3}, {1, 2, 2, 4},
UniversalSpace -> {-40, 15, 1}]](HTMLFiles/version2_102.gif)
![FuzzyTrapezoid[-36, 4, 4, 12, UniversalSpace -> {-40,
15, 1}]](HTMLFiles/version2_103.gif)
In the following, you can plot an approximate result of the fuzzy product.
Notice the use of the command ReleaseHold.
![FuzzyPlot[ReleaseHold[Multi1]] ;](HTMLFiles/version2_104.gif)
![[Graphics:HTMLFiles/version2_105.gif]](HTMLFiles/version2_105.gif)
FuzzyDivide[{a1, b1, c1, d1},
{a2, b2, c2, d2}] returns the division of
the fuzzy numbers represented by the two lists. The fuzzy division is returned
as an unevaluated
FuzzyTrapezoid. To evaluate FuzzyTrapezoid,
use the function ReleaseHold.
![Div1 = FuzzyDivide[{-9, 2, 2, 3}, {1, 2, 2, 4},
UniversalSpace -> {-10, 10}]](HTMLFiles/version2_106.gif)
![FuzzyTrapezoid[-9, 1, 1, 3, UniversalSpace -> {-10,
10, 1}]](HTMLFiles/version2_107.gif)
You can plot the approximate result of the fuzzy division.
Notice the use of the command ReleaseHold.
![FuzzyPlot[ReleaseHold[Div1]] ;](HTMLFiles/version2_108.gif)
![[Graphics:HTMLFiles/version2_109.gif]](HTMLFiles/version2_109.gif)
Fuzzy Clustering
Fuzzy C-Means (FCM) Clustering
FCMCluster[data, partmat, mu,
epsilon] returns a list of cluster
centers, a partition matrix indicating the degree to which each data point
belongs to a particular cluster center,
and a list containing the progression of cluster centers found during the run.
The arguments to the function are the
data set (data), an initial partition matrix (partmat), a value
determining the degree of fuzziness of
the clustering (mu), and a value that determines when the algorithm
terminates (epsilon). This function
runs recursively until the terminating criteria are met. While running, the function
prints a value that indicates the
accuracy of the fuzzy clustering. When this value is less than the parameter
epsilon, the function terminates.
The parameter mu is called the exponential weight and controls the
degree of fuzziness of the clusters. As
mu approaches 1, the fuzzy clusters become crisp clusters, where
each data point belongs to only one cluster.
As mu approaches infinity, the clusters become completely fuzzy,
and each point belongs to each cluster to the
same degree (1/c) regardless of the data. Studies have been done on selecting
the value for mu, and it appears
that the best choice for mu is usually in the interval [1.5, 2.5], where the
midpoint, mu = 2, is
probably the most commonly used value for mu.
To demonstrate the FCM clustering algorithm, you can create a data set that
consists of four groups of data.

![g1 = Show[Graphics3D[Map[{Hue[0], PointSize[.02],
Point[#]} &, TrainData3D]], Axes -> True] ;](HTMLFiles/version2_111.gif)
![[Graphics:HTMLFiles/version2_112.gif]](HTMLFiles/version2_112.gif)
![Res1a = FCMCluster[TrainData3D,
InitializeU[TrainData3D, 4], 2, .01]](HTMLFiles/version2_113.gif)








The last line shows coordinates for four centers. The clustering function
also provides the degrees to which each
data point belongs to each cluster as well as the cluster center progression. Because
there are problems showing the cluster
centers for data of higher dimensions, the function ShowCenters
works only for 2D clustering. If you want to
see the 3D cluster centers with the original data, you could do the following.
![g2 = Show[g1, Graphics3D[Map[{Hue[0.7],
PointSize[.03], Point[#]} &, Res1a[[1]]]]] ;](HTMLFiles/version2_122.gif)
![[Graphics:HTMLFiles/version2_123.gif]](HTMLFiles/version2_123.gif)
The clustering function should work for data of any dimension, but it is hard
to visualize the results for higher-order data.
|