Current location - Training Enrollment Network - Mathematics courses - How to calculate fuzzy consistent matrix
How to calculate fuzzy consistent matrix
The best answer report "fuzzy equivalence matrix"; English comparison

Fuzzy equivalent matrix;

"Fuzzy equivalence matrix"; Interpretation in academic literature

1 and r satisfy reflexivity and symmetry, and meet the following requirements: (3) transitive min(r*k, r auxiliary) town r.j' is called fuzzy equivalent matrix, and r' is loaded into ordinary equivalent matrices r' and' ren' according to any specified closed value (0 ear kernel 1).

Literature source

2. This matrix is called fuzzy equivalent matrix. The equivalent matrix can be constructed by the square self-synthesis method as follows: R. R = = R. R. = R. If R = R, R is a fuzzy equivalent matrix.

Fuzzy clustering analysis set based on fuzzy equivalence relation

Suppose that R is a fuzzy equivalence relation on X, and any a- cut set of A and R is a common equivalence relation on X, so X can be classified by fuzzy relation on X. When we take different values of A, we can get different classification results, that is, the classification is dynamic.

In practice, in general, we get a series of samples, assuming there are n samples, and each sample can be regarded as a point in the M-dimensional space. It can be expressed as follows: domain:, for the i-th element, there are

1. data preprocessing

Considering that different data may have different dimensions, it is necessary to transform the data considerably before further processing. Commonly used transformations are standard deviation transformation and range transformation:

Standard deviation conversion:

After the transformation, the average value of each variable is 0 and the standard deviation is 1, which can eliminate the influence of dimension, but the value is not necessarily between 0 and 1.

Range conversion:

After the transformation, the influence of dimension is eliminated, and the value is between 0- 1.

2 the establishment of fuzzy similarity matrix

The fuzzy relation matrix on the universe can be established from the known data, and its purpose is to provide data for constructing the fuzzy equivalent matrix.

There are many methods to calculate fuzzy relation matrix, such as angle cosine method, correlation coefficient method, arithmetic average method, geometric average method and maximum-minimum method. Taking the angle cosine as an example, it can be calculated by the following formula:

3 Using transitive closure method to find the fuzzy equivalent matrix

The matrix established by the above process is generally reflexive, symmetrical and unsatisfied with transitivity, so it must be transformed into a fuzzy equivalent matrix. Transitive closure method is often used, that is, from the above R matrix, R 2->; r^4->; R 8 ... until the first appearance of R K× R K = R K, indicating that R is transitive.

According to the fuzzy equivalence matrix and a certain A, the classification result is obtained.

Part of the code implementation:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

'

Process name: Norm_Diff

Parameter: Data()-Double, the two-dimensional array to be converted.

Description: After executing the change function, the array contains the converted data.

Author:

Modified by laviepbt

Revision date: 2006- 1 1- 1.

'

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

public Sub Norm _ Diff(ByRef Data()As Double)

Dim m is an integer, n is an integer, I is an integer and j is an integer.

Dim Ave is Double and s is Double.

N = ubound (data, 1): m = ubound (data, 2)' n samples, m variables.

For j = 1 to m

Average = 0

For i = 1 to n

Ave = Ave + Data(i,j)

then

Ave = Ave/N 'ave is the average value.

s = 0

For i = 1 to n

S = s+(data (I, j)-ave) 2' s is the standard deviation.

then

S = Sqr (signal to noise ratio)

For i = 1 to n

Data(i,j) = (Data(i,j) - Ave) / s

then

then

End joint

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

'

Process name: Extre_Diff

Parameter: Data()-Double, the two-dimensional array to be converted.

Description: After executing the change function, the array contains the converted data.

Author:

Modified by laviepbt

Revision date: 2006- 1 1- 1.

'

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

public Sub Extre _ Diff(ByRef Data()As Double)

Dim m is an integer, n is an integer, I is an integer and j is an integer.

Dim Max is Double, Min is Double and d is Double.

N = ubound (data, 1): m = ubound (data, 2)' n samples, m variables.

For j = 1 to m

max =- 1000000000 #:Min = 1000000000 #

For i = 1 to n

If Data(i,j)>Max Then Max = Data(i,j)

If Data(i,j)& lt; Min Then Min = Data(i,j)

then

D = Max-Min'd range.

For i = 1 to n

Data(i, j) = (Data(i, j)-Min)/d' range standardization transformation.

then

then

End joint

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

'

Process name: angle _Cos

Parameter: Data()- Double precision, two-dimensional array data.

R()-Double, similarity matrix

Explanation:

Author:

Modified by laviepbt

Revision date: 2006- 1 1- 1.

'

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Public Sub Angle_Cos(ByRef Data () is Double, ByRef R () is Double).

Dim m is an integer, n is an integer, I is an integer, j is an integer and k is an integer.

Dim S 1 is Double, Si2 is Double and Sj2 is Double.

N = ubound (data, 1): m = ubound (data, 2)' n samples, m variables.

For i = 1 to n

For j = 1 to n

If i = j, then

R(i,j) = 1

other

S 1 = 0: Si2 = 0: Sj2 = 0

For k = 1 to m

S 1 = S 1 + Data(i,k) * Data(j,k)

Si2 = Si2+data (i, k) 2

Sj2 = Sj2+data (j, k) 2

then

R(i,j)= Int((s 1/Sqr(Si2 * Sj2))* 1000+0.5)/ 1000

If ... it will be over.

then

then

End joint

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

'

Process Name: Relevance

Parameter: Data()- Double precision, two-dimensional array data.

R()-Double, similarity matrix

Explanation:

Author:

Modified by laviepbt

Revision date: 2006- 1 1- 1.

'

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Common child correlation (ByRef Data () is Double, ByRef R () is Double).

Dim m is an integer, n is an integer, I is an integer, j is an integer and k is an integer.

Dimxia is body double and Xja is body double.

Dim S 1 is Double, Si2 is Double and Sj2 is Double.

N = ubound (data, 1): m = ubound (data, 2)' n samples, m variables.

For i = 1 to n

For j = 1 to n

If i = j, then

R(i,j) = 1

other

Xia = 0: Xja = 0

For k = 1 to m

Xia = Xia + Data(i,k)

Xja = Xja + Data(j,k)

then

Summer = summer/meter

Xja = Xja / m

S 1 = 0: Si2 = 0: Sj2 = 0

For k = 1 to m

S 1 = S 1 + Abs((Data(i,k) - Xia) * (Data(j,k) - Xja))

Si2 = Si2+(data (i, k)-xia) 2

Sj2 = Sj2+(data (j, k)-xja) 2

then

R(i,j)= Int((s 1/Sqr(Si2 * Sj2))* 1000+0.5)/ 1000

If ... it will be over.

then

then

End joint

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

'

Process name: TR

Parameter: R()-Double, similarity matrix.

RR()- double precision fuzzy product matrix

Explanation:

Author:

Modified by laviepbt

Revision date: 2006- 1 1- 1.

'

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Public Sub TR(ByRef R () is Double, ByRef RR () is Double).

Dim N is an integer and l is an integer.

Dim i is an integer, j is an integer and k is an integer.

Dim i 1 is an integer, and j 1 is an integer.

Dim dMax is Double.

N = UBound(R, 1)

Resets dMin( 1 to n) to a double-precision value.

l = 0

100:

l = l + 1

If l>, then 100

MsgBox "has been squared 100 times, but it still has no transitivity", vbCritical, "Error"

outlet connection

If ... it will be over.

For i = 1 to n

For j = 1 to n

For k = 1 to n

If R(i, k) < = R(k, j) Then

dMin(k) = R(i,k)

other

dMin(k) = R(k,j)

If ... it will be over.

then

DMax = dMin( 1)' Multiplication of fuzzy matrix, take the minimum and take the maximum.

For k = 1 to n

If dMin(k)>dMax, dMax = dMin(k)

then

RR(i,j) = dMax

then

then

For i = 1 to n

For j = 1 to n

Judge whether it is a fuzzy equivalent matrix, otherwise continue to do it.

If R(i, j) <; & gt then RR(i, j)

For i 1 = 1 to n

For j 1 = 1 to n

R(i 1,j 1) = RR(i 1,j 1)

then

then

Go to 100

If ... it will be over.

then

then

End joint

Please refer to the book Basic Fuzzy Mathematics and Practical Algorithms for all codes.

Processing results: Take the following data as an example: select the range method to preprocess the data, and calculate the similarity matrix with the angle cosine method.

Data fuzzy equivalent matrix

Some analysis results:

********************************

Input value: 0.908

1 class: U 1 U2 U3 U4

Category 2: U5 U6

Category 3: U7 U8

Efficacy value: 6.099

Critical value with significance of 0.2: 2.259.

The critical value of significance is. 1: 3.78.

Conclusion: Under the given critical value, the classification effect is particularly significant. à à à à à à à à à à à à à à à à à à à à à à à à à à à à à à à à?

********************************

Input value: 0.894

1 class: U 1 U2 U3 U4

Category 2: U5 U6 U7 U8

Efficacy value: 7.634

The critical value of significance is 0.2: 2.073.

Significance is the critical value of. 1: 3.776.

Conclusion: Under the given critical value, the classification effect is particularly significant. à à à à à à à à à à à à à à à à à à à à à à à à à à à à à à à à?

********************************

Input value: 0.888

1 class: U 1 U2 U3 U4 U5 U6 U7 U8

F efficacy value: * * * * * *

Critical value with importance of 0.2: * * * * * *

Critical value with importance of. 1: * * * * * *

Conclusion: Under the given critical value, the classification effect is not significant.

********************************

Obviously, for different lamda values and different aggregation effects, F test can be considered to brush out some unreasonable classifications. For details, please refer to the book "Fundamentals and Practical Algorithms of Fuzzy Mathematics".