3.7.3. Defuzzification

Defuzzification is the method which generates quantifiable results in crisp logic which is achieved from fuzzy sets and membership functions with consistent degrees. It is the method that plots a fuzzy set to a crisp set. It uses a set of rules that change a number of variables into a fuzzy result. It produces computable results which contains fuzzy sets and membership functions. It performs mapping output of fuzzy sets into crisp values. Here, we take triangular MF which defines the exact conclusions. If the degree of the membership function is not equal to 1, we have to use a trapezoidal shape instead of a triangle shape. Here are some rules which tell us relation between sentiment score and type of loyalty [14].

The last step in the fuzzy logic system is the defuzzification. After the implementation is complete in the inference step, we achieve an output value and the output value obtained from it is known as fuzzy value. In order to signify this fuzzy value in a proper way, we required to convert it into Crisp Output Value. The process of converting the fuzzy value into Crisp Output Value is known as Defuzzification

Output Membership Function for "Customer Loyalty": We convert the fuzzy output to the crisp output which is formed by the steps of fuzzy inference system, the Customer Loyalty Membership function is taken as output MF. It consists of the different types of Customer Loyalty which are calculated by firm value of sentiment score. Such as, if sentiment score is in between 0.75 then loyalty will also be increase at the almost same level of 0.75 and this type of loyalty is known as "True Loyalty". We apply defuzzification rules to clarify the relation process between sentiment score and customer loyalty.

Defuzzification rules: Here are some rules of defuzzification where '*x*' denotes the sentiment score while '*y*' denotes the type of loyalty:

> if (0.0 ≤ *x* < 0.30), then *y* = 'Pseudo Loyalty' if (0.30 ≤ *x* < 0.70), then *y* = 'Latent Loyalty' if (0.70 ≤ *x* ≤ 1.0), then *y* = 'True Loyalty'

Figure 7 shows a graphical representation of triangular membership functions in which we consider sentiment score on the x-axis while membership on the y-axis. These score of sentiments analysis shows how much loyalty we achieved from the reviews of the online products. We noticed that the most of the sentiment values occurs between 0 and 1; this shows our graph gives almost positive results. Here is algorithm which presents the functionality and working of triangular membership function graph. This graph shows *x* as a vector and three points *a*, *b* and *c* are the scalar, where "*a*" is the lower limit from where our sentiment score starts increasing, it is also known as "min" function while "*b*" is the peak limit or level from the sentiment score are stop increasing and it is also known as "max" function and "*c*" is the middle point or the value where our sentiment score achieve its highest point, such as in the following chart, the curve of the graph is at the highest level of 0.7, which means that most of our reviews lies at this point between positive and neutral. Here x-axis denotes the sentiment score lie between 0.0–1.0 and the y-axis denotes the values of membership.

**Figure 7.** The triangular fuzzy membership function plot for loyalty as an outputs.
