#### Introduction

Often in pharmaceuticals, especially when dealing with biological data (such as relating to product formulation or to microbial contamination), things are not always very clear and can appear vague. Another word for this is ‘fuzzy’. This is particularly so when trying to decipher whether a statement is true or false. In the financial sector, similar situations arise and one of the tools used to overcome this dilemma is to employ the thought process of fuzzy logic (1). Does this approach have a role in the pharmaceutical and healthcare products sector?

While some approaches to risk assessment, most notably Failure Modes and Effects Analysis (FMEA), us numerical scoring approaches, fuzzy logic is based on the fact that people generally make decisions based on imprecise and non-numerical information (even if they subsequently attempt to force their decision into a numerical value, as is required with FMEA). Fuzzy models provide a mathematical means to represent this vagueness and concerns about imprecise information (or what is said to be ‘fuzzy’).

For example, a temperature to kill a given microbial population will have separate membership functions defining particular temperature ranges needed to kill the population. Each function maps the same temperature value to a truth value in the 0 to 1 range. These truth values can then be used to determine temperature should be controlled. The fuzzy logic approach provides a means for representing the uncertainty (2).

The advantage of fuzzy logic is that it provides valuable flexibility for reasoning by considering the uncertainties of the situation. Sometimes where there is too much certainty at the outset, this involves important data or events from being overlooked. With fuzzy logic, the outcome of an operation can be expressed as a probability rather than as a certainty. When the scope is too narrow and something important is inadvertently excluded, this can undermine root cause analysis and hence the assessment of all hazards that require assessing when undertaking a risk assessment.

#### Fuzzy Logic

The fuzzy logic approach can assist in solving a particular problem after considering all the available data and then taking the suitable decision. In a sense, a fuzzy logic approach is designed to emulate the human way of decision making. This involves considering each of the possibilities and fall between the seemingly absolutes of True and False. This is typically represented by a range of values between 1 (true) and 0 (false). To express this qualitatively, in addition to something being either true or false, an outcome might have meanings like probably true, possibly true, possibly false, and probably false. Or, if this was to be expressed verbally, then between ‘yes’ and ‘no’ there can be:

This concept contrasts with Boolean logic (which has its roots in classical logic), where the truth values of variables may only be the integer values 0 or 1 (3). The different between fuzzy logic and Boolean logic can be shown with the types of logic operators used:

To take an everyday example, of the question is posed “is it cold outside?”, then Boolean logic has only two possible answers:

- Yes
- No

Whereas, fuzzy logic can provide answers such as:

- Very cold
- Little cold
- Moderately cold
- Not at all cold

The answers for the fuzzy logic outcomes answers can be displayed with the help of values between 0 and 1.

Taking a second example: ‘Is the vessel for the active pharmaceutical ingredient full’?

Boolean logic:

- Yes
- No

Fuzzy logic:

- Vessel is full
- Vessel is almost full
- Vessel is half Full
- Vessel is almost empty
- Vessel is empty

The source of fuzziness can be the consequence of the nature of the reality being dealt with; the concepts used to interpret it; or the way in which the two are being related by a person or persons.

#### Incorporation of fuzzy logic into risk management

When presented with an observation or event, under real-world conditions this can sometimes be antinomic (a logically self-contradictory statement or a statement that runs contrary to one's expectation) (4). To help to assess how the observation event impact upon the risk at a given time, the following steps can be followed (5):

- Fuzzification
- Inference
- Composition
- Defuzzification

This can be illustrated with an example, based on Failure Modes and Effects Analysis.

To manage an upgrade to a centrifuge, the engineering staff have assessed its risk using the fuzzy logic-based risk assessment method. This is based on whether to halt production and make a repair (leading to loss of production, where the repair may not be necessary) or whether not to undertake the repair, with the scenario that either the centrifuge operates within design parameters until the next maintenance point, or it has a breakdown at a point in the near future, potentially losing a batch and causing the same production delay. As well as the prevailing uncertainty, there are also multiple opinions. How can the ‘fuzziness’ of these perspectives be resolved?

The severity and probability of the possible breakdown have been determined by some expert external contractor reports, result of which are the following:

- Degree of severity was 4.75 in a numeric scale from 0 to 10.
- Probability of occurrence was 0.005, as averages of the expert reports.

With the outcomes, the engineers are faced with fuzziness over the different expert reports, together with their own opinions, in terms of probability in relation to making the repair, together with an average assessment of the severity.

**Step 1: Fuzzification**

In the fuzzification subprocess, the membership functions defined on the input variables are applied to their actual values, to determine the degree of truth P(xi) for each rule premise, using the 1 to 0 scale. In this case the degrees of truth of severity sets are:

- µ (severity-is-critical) = 0.75
- µ (severity-is-moderate) = 0.25

Fuzzification applies because the severity of the investigated event is in some degree critical and moderate.

Next, considering degrees of truth of probability sets, these are:

- µ (probability-is-likely) = 0.70
- µ (severity-is-seldom) = 0.30

This means, probability of the event’s occurrence mentioned above can be likely and infrequent, to some degree.

**Step 2: Inference**

With this step, the truth-value for the premise of each rule is computed and applied to the conclusion part of each rule. This results in one fuzzy subset to be assigned to each output variable for each rule.

In the example only there are only four logical rules, which are practically used. These are:

- Rule (A): If severity is critical and probability is likely then risk is high;
- Rule (B): If severity is moderate and probability is likely then risk is medium;
- Rule (C): If severity is critical and probability is seldom then risk is medium;
- Rule (D): If severity is moderate and probability is seldom then risk is low.

The risk, based on the four rules, can be high, medium and low. Fuzzy logic approaches can help to unwind this conflict. In the fuzzy logic approach, the minimum operator is used instead and classical logic connection. Therefore:

- Rule (A) – risk_is_high: µ (ZA) = min (0.75; 0.70) = 0.70
- Rule (B) – risk_is_medium: µ (ZA) = min (0.25; 0.70) = 0.25
- Rule (C) – risk_is_medium: µ (ZA) = min (0.75; 0.30) = 0.30
- Rule (D) – risk_is_low: µ (ZA) = min (0.25; 0.30) = 0.25

In the example, the truth-values of all other rules would be zero, therefore there is no need to consider them further.

**Step 3: Composition**

In the composition subprocess, all of the fuzzy subsets assigned to each output variable are combined together to form a single fuzzy subset for each output variable. Results of two rules are same (namely medium), the degree of membership:

µ(risk_is_medium) = max. [µ(zB); (µ(zC)] = max.(0.25; 0.30) = 0.3

Based on the above:

- µ(risk_is_high) = 0.7;
- µ(risk_is_medium) = 0.3;
- µ(risk_is_low) = 0.25.

**Step 4: Defuzzification**

The defuzzification step is designed to creates a ranking from the fuzzy conclusion set. It should be noted that there is no common algorithm for defuzzification, different approaches can be used. However, the objective is to obtain a continuous variable from fuzzy truth values (6).

The example use here is the Weighted Mean of Maximum (WMoM) method is a commonly used procedure. This method gives the average, weighted by their degree of truth, of the support values at which all the membership functions that apply reach their maximum value.

Formally, the Weighted Mean of Maximum conclusion is called Z.

To calculate Z:

Z = 0.25.0.85 + 0.3.3.5 + 0.7.70

0.25+0.3+0.7

Z = 6.1625

1.25

Z = 4.93

The outcome of Z , that is, the degree of risk of investigated undesired event is: 4.93.

This presents a medium level of risk.

The engineers could use this result to accept the risk during the next step of risk management process. Balancing assessed risk and the probable benefit of the repair, the engineer can probably decide to grow ahead with the modification.

A different example could be with a refrigeration device, such as one used for holding medicinal products. Such a device will have a temperature and a fan speed, with the fan required to function differently in relation to different temperatures (or different temperatures may occur if the fan is not operating reliably). Here we have the following fuzzification:

- IF temperature IS very cold THEN fan_speed is stopped
- IF temperature IS cold THEN fan_speed is slow
- IF temperature IS warm THEN fan_speed is moderate
- IF temperature IS hot THEN fan_speed is high

The above could be used in the same way as the centrifuge example, in terms of making repairs. Or, we could use the same approach to determine how an incubator in a laboratory should operate, such as:

- IF temperature=(Cold OR Very_Cold) AND target=Warm THEN Heat
- IF temperature=(Hot OR Very_Hot) AND target=Warm THEN Cool
- IF (temperature=Warm) AND (target=Warm) THEN No_Change

Many fuzzy logic models can be automated, with computers running the assessments. By mimicking how a person would make decisions, the computer needs to be programmed to behave less precisely and logically than a conventional computer would.

#### Change control and medicine

Fuzzy logic can also when an established risk is subject to change, particularly where the change can push something towards uncertainty. Move over, the risk management process is often a continuous one designed to detect, assess, and control risk in a dynamic state. A related area of change is with medical concepts, which tend to have an ongoing expanding and evolving nature, and with medical assessments, which can be highly changeable. Moreover, medical practitioners exhibit variation in decision making because of their approaches to deal with uncertainties and vagueness in the knowledge and information (7).

#### Summary

This article has attempted to show how fuzzy logic can assist with assessing pharmaceuticals and healthcare risks. The approach is suitable where there is an open, imprecise spectrum of data that makes it possible to obtain an array of accurate conclusions.

Like any risk management exercise, the degree of effort should be proportionate to the risk. The fuzzy logic approach may not be suitable for low risk events or where the root cause can be easily discerned. However, for more complex risk assessments and where there are different opinions on the scale of the risk (either in terms of severity or likelihood), then the fuzzy logic approach can aid the assessment of the degree of uncertainty.

It is also important to note that fuzzy logic is not always correct. Also, the results are based on assumptions and these may not be widely accepted.

#### References

- Pokoradi, L (2001) Fuzzy logic in the aircraft diagnostics, Proc. of 7th International Conference Airplanes and Helicopters Diagnostics, AIRDIAG, Ameliówka, Poland, 16-19.10.2001. pp. 191–197
- Biacino, L.; Gerla, G. (2002). Fuzzy logic, continuity and effectiveness. Archive for Mathematical Logic. 41 (7): 643–667
- Givant, Steven; Halmos, Paul (2009). Introduction to Boolean Algebras. Undergraduate Texts in Mathematics, Springer. ISBN 978-0-387-40293-2
- Smith, W. K.; Lewis, M. W. (2011). Toward a theory of paradox: A dynamic equilibrium model of organizing. Academy of Management Review. 36 (2): 381–403
- Zadeh, L.A. (1965). Fuzzy sets. Information and Control. 8 (3): 338–353
- Novák, V.; Perfilieva, I.; Močkoř, J. (1999). Mathematical principles of fuzzy logic. Dordrecht: Kluwer Academic
- De S.K., Biswas R and Roy A.R., (2001) An application of intuitionistic fuzzy sets in medical diagnosis. Fuzzy Sets and Systems, 117 (2): 209-21

## Post new comment