**Namespace:**
AForge.Fuzzy

**Assembly:**
AForge.Fuzzy (in AForge.Fuzzy.dll) Version: 2.2.4.0 (2.2.4.0)

# Syntax

C# |
---|

public class CentroidDefuzzifier : IDefuzzifier |

# Remarks

In many applications, a Fuzzy Inference System is used to perform linguistic computation, but at the end of the inference process, a numerical value is needed. It does not mean that the system needs precision, but simply that a numerical value is required, most of the times because it will be used to control another system that needs the number. To obtain this numer, a defuzzification method is performed.

This class implements the centroid defuzzification method. The output of a Fuzzy Inference System is a set of rules (see Rule) with firing strength greater than zero. Those firing strength apply a constraint to the consequent fuzzy sets (see FuzzySet) of the rules. Putting all those fuzzy sets togheter results in a a shape that is the linguistic output meaning.

The centroid method calculates the center of the area of this shape to obtain the numerical representation of the output. It uses a numerical approximation, so a number of intervals must be choosen. As the number of intervals grow, the precision of the numerical ouput grows.

For a sample usage of the CentroidDefuzzifier see InferenceSystem class.