defuzzify¶skfuzzy.defuzzify subpackage, containing various defuzzification algorithms.
skfuzzy.defuzzify.arglcut(ms, lambdacut) |
Determines the subset of indices mi of the elements in an N-point resultant fuzzy membership sequence ms that have a grade of membership >= lambdacut. |
skfuzzy.defuzzify.centroid(x, mfx) |
Defuzzification using centroid (center of gravity) method. |
skfuzzy.defuzzify.dcentroid(x, mfx, x0) |
Defuzzification using a differential centroidal method about x0. |
skfuzzy.defuzzify.defuzz(x, mfx, mode) |
Defuzzification of a membership function, returning a defuzzified value of the function at x, using various defuzzification methods. |
skfuzzy.defuzzify.lambda_cut(ms, lcut) |
The crisp (binary) lambda-cut set of the membership sequence ms with membership >= lcut. |
skfuzzy.defuzzify.lambda_cut_boundaries(x, ...) |
Find exact boundaries where mfx crosses lambdacut using interpolation. |
skfuzzy.defuzzify.lambda_cut_series(x, mfx, n) |
Determine a series of lambda-cuts in a sweep from 0+ to 1.0 in n steps. |
skfuzzy.defuzzify.arglcut(ms, lambdacut)[source]¶Determines the subset of indices mi of the elements in an N-point resultant fuzzy membership sequence ms that have a grade of membership >= lambdacut.
| Parameters: | ms : 1d array
lambdacut : float
|
|---|---|
| Returns: | lidx : 1d array
|
Notes
This is a convenience function for np.nonzero(lambdacut <= ms) and only half of the indexing operation that can be more concisely accomplished via:
ms[lambdacut <= ms]
skfuzzy.defuzzify.dcentroid(x, mfx, x0)[source]¶Defuzzification using a differential centroidal method about x0.
| Parameters: | x : 1d array or iterable
mfx : 1d array or iterable
x0 : float
|
|---|---|
| Returns: | u : 1d array
|
skfuzzy.defuzzify.defuzz(x, mfx, mode)[source]¶Defuzzification of a membership function, returning a defuzzified value of the function at x, using various defuzzification methods.
| Parameters: | x : 1d array or iterable, length N
mfx : 1d array of iterable, length N
mode : string
|
|---|---|
| Returns: | u : float or int
|
skfuzzy.defuzzify.lambda_cut(ms, lcut)[source]¶The crisp (binary) lambda-cut set of the membership sequence ms with membership >= lcut.
| Parameters: | ms : 1d array
lcut : float
|
|---|---|
| Returns: | mlambda : 1d array
|
skfuzzy.defuzzify.lambda_cut_boundaries(x, mfx, lambdacut)[source]¶Find exact boundaries where mfx crosses lambdacut using interpolation.
| Parameters: | x : 1d array, length N
mfx : 1d array, length N
lambdacut : float
|
|---|---|
| Returns: | boundaries : 1d array
|
Notes
The values returned by this function can be thought of as intersections
between a hypothetical horizontal line at lambdacut and the membership
function mfx. This function assumes the end values of mfx continue
on forever in positive and negative directions. This means there will NOT
be crossings found exactly at the bounds of x unless the value of
mfx at the boundary is exactly lambdacut.
skfuzzy.defuzzify.lambda_cut_series(x, mfx, n)[source]¶Determine a series of lambda-cuts in a sweep from 0+ to 1.0 in n steps.
| Parameters: | x : 1d array
mfx : 1d array
n : int
|
|---|---|
| Returns: | z : 2d array, (n, 3)
|