fuzzy-logic-toolkit

fuzzy-logic-toolkit

0.6.1 2024-08-31

A mostly MATLAB-compatible fuzzy logic toolkit for Octave.

Select Category:

Evaluation

defuzz For a given domain, set of fuzzy function values, and defuzzification method, return the defuzzified (crisp) value of the fuzzy function.
evalfis Return the crisp output(s) of an FIS for each row in a matrix of crisp input values.
evalmf For a given domain, set of parameters, membership function type, and optional hedge and not_flag, return the corresponding y-values for the membership function.

Plotting

gensurf Generate and plot a surface (or 2-dimensional curve) showing one FIS output as a function of two (or one) of the FIS inputs.
plotmf Plot the membership functions defined for the specified FIS input or output variable on a single set of axes.

File Input/Output of Fuzzy Inference Systems

readfis Read the information in an FIS file, and using this information, create and return an FIS structure.
writefis Save the specified FIS currently in the Octave workspace to a file named by the user.

Command-Line Creation and Modification of Fuzzy Inference Systems

addmf Add a membership function to an existing FIS structure and return the updated FIS.
addrule Add a list of rules to an existing FIS structure and return the updated FIS.
addvar Add an input or output variable to an existing FIS structure and return the updated FIS.
newfis Create and return a new FIS structure using the argument values provided.
rmmf Remove a membership function from an existing FIS structure and return the updated FIS.
rmvar Remove an input or output variable from an existing FIS structure and return the updated FIS.
setfis Set a property (field) value of an FIS structure and return the updated FIS.

Text Representation of Fuzzy Inference Systems

getfis Return or print the property (field) values of an FIS structure specified by the arguments.
showfis Print all of the property (field) values of the FIS structure and its substructures.
showrule Show the rules for an FIS structure in verbose, symbolic, or indexed format.

Membership Functions

dsigmf For a given domain X and parameters PARAMS (or [A1 C1 A2 C2]), return the corresponding Y values for the difference between two sigmoidal membership functions.
gauss2mf For a given domain X and parameters PARAMS (or [SIG1 C1 SIG2 C2]), return the corresponding Y values for the two-sided Gaussian composite membership function.
gaussmf For a given domain X and parameters PARAMS (or [SIG C]), return the corresponding Y values for the Gaussian membership function.
gbellmf For a given domain X and parameters PARAMS (or [A B C]), return the corresponding Y values for the generalized bell-shaped membership function.
pimf For a given domain X and parameters PARAMS (or [A B C D]), return the corresponding Y values for the pi-shaped membership function.
psigmf For a given domain X and parameters PARAMS (or [A1 C1 A2 C2]), return the corresponding Y values for the product of two sigmoidal membership functions.
sigmf For a given domain X and parameters PARAMS (or [A C]), return the corresponding Y values for the sigmoidal membership function.
smf For a given domain X and parameters PARAMS (or [A B]), return the corresponding Y values for the S-shaped membership function.
trapmf For a given domain X and parameters PARAMS (or [A B C D]), return the corresponding Y values for the trapezoidal membership function.
trimf For a given domain X and parameters PARAMS (or [A B C]), return the corresponding Y values for the triangular membership function.
zmf For a given domain X and parameters PARAMS (or [A B]), return the corresponding Y values for the Z-shaped membership function.

T-Norms and S-Norms (in addition to max/min)

algebraic_product Return the algebraic product of the input.
algebraic_sum Return the algebraic sum of the input.
bounded_difference Return the bounded difference of the input.
bounded_sum Return the bounded sum of the input.
drastic_product Return the drastic product of the input.
drastic_sum Return the drastic sum of the input.
einstein_product Return the Einstein product of the input.
einstein_sum Return the Einstein sum of the input.
hamacher_product Return the Hamacher product of the input.
hamacher_sum Return the Hamacher sum of the input.

Complete Fuzzy Inference System Demos

cubic_approx_demo Demonstrate the use of the Octave Fuzzy Logic Toolkit to approximate a non-linear function using a Sugeno-type FIS with linear output functions.
heart_disease_demo_1 Demonstrate the use of newfis, addvar, addmf, and addrule to build and evaluate an FIS.
heart_disease_demo_2 Demonstrate the use of the Octave Fuzzy Logic Toolkit to read and evaluate a Sugeno-type FIS stored in a file.
investment_portfolio_demo Demonstrate the use of the Octave Fuzzy Logic Toolkit to read and evaluate a Mamdani-type FIS stored in a file.
linear_tip_demo Demonstrate the use of linear output membership functions to simulate constant membership functions.
mamdani_tip_demo Demonstrate the use of the Octave Fuzzy Logic Toolkit to read and evaluate a Mamdani-type FIS stored in a file.
sugeno_tip_demo Demonstrate the use of the Octave Fuzzy Logic Toolkit to read and evaluate a Sugeno-type FIS with multiple outputs stored in a text file.

Fuzzy Clustering Functions

fcm Using the Fuzzy C-Means algorithm, calculate and return the soft partition of a set of unlabeled data points.
gustafson_kessel Using the Gustafson-Kessel algorithm, calculate and return the soft partition of a set of unlabeled data points.
partition_coeff Return the partition coefficient for a given soft partition.
partition_entropy Return the partition entropy for a given soft partition.
xie_beni_index Return the Xie-Beni validity index for a given soft partition.