FSharp.Fuzzy


Fuzzy

This module contains bunch of factory methods for Fuzzy type

Functions and values

Function or valueDescription
alpha total level
Signature:total:int -> level:int -> decimal<1>

Converts number of the level in \(\alpha\)-cut array to the value of membership function \(\mu\)

binary f a b
Signature:f:(Interval * Interval -> decimal) -> a:Fuzzy -> b:Fuzzy -> decimal

Binary function for defuzzification of the result of operation f applied to each pair of corresponding \(\alpha\)-cuts taken from a and b weighted by value of \(\mu\). For example, useful for calcualtion of the distance between two fuzzy sets: \({\Delta }_{\bar{A}-\bar{B}} = \frac{\sum_{\alpha}\alpha \Delta_{A_\alpha-B_\alpha}}{\sum_{\alpha}\alpha}\) Note that \(\sum_{\alpha}\alpha = \frac{n}{2}\) where \(n\) - number of \(\alpha\)-cuts

Important! a and b should have same number of \(\alpha\)-cuts

distance a b
Signature:a:Fuzzy -> b:Fuzzy -> decimal

Calculates distance between two fuzzy sets a and b

interval (a, b, c, d)
Signature:(a:decimal * b:decimal * c:decimal * d:decimal) -> Fuzzy

Creates trapezoid with 11 \(\alpha\)-cuts which gives increment of 0.1 in \(\mu\) from one \(\alpha\)-cut to the next

number (a, b, c)
Signature:(a:decimal * b:decimal * c:decimal) -> Fuzzy

Creates triangular fuzzy set with bottom \(\alpha\)-cut {a,c} and zero-length top \(\alpha\)-cut b

plot a
Signature:a:Fuzzy -> (decimal * decimal<1>) []

Represents fuzzy set a for drawing a chart

point a
Signature:a:decimal -> Fuzzy

Creates fuzzy representation of zero-length interval

risk a
Signature:a:Fuzzy -> decimal

Calculates weighted risk of fuzzy set a, i.e. the ratio between its width and the middle on each \(\alpha\)-cut

trapezoid levels (a, b, c, d)
Signature:levels:int -> (a:decimal * b:decimal * c:decimal * d:decimal) -> Fuzzy

Creates trapezoid fuzzy set with bottom \(\alpha\)-cut {a,d} and top \(\alpha\)-cut {b,c}

unary f a
Signature:f:(Interval -> decimal) -> a:Fuzzy -> decimal

Unary function for defuzzification of the result of operation f applied to each \(\alpha\)-cut of a weighted by corresponding value of \(\mu\). \(W f = \frac{\sum_{\alpha}\alpha f}{\sum_{\alpha}\alpha}\) Note that \(\sum_{\alpha}\alpha = \frac{n}{2}\) where \(n\) - number of \(\alpha\)-cuts

width a
Signature:a:Fuzzy -> decimal

Calculates weighted width of fuzzy set a

Fork me on GitHub