Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Composing Fuzzy If–Then Rules | Fuzzy Logic Operations
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Fuzzy Logic and Approximate Reasoning

bookComposing Fuzzy If–Then Rules

To build decision-making systems with fuzzy logic, you use fuzzy if–then rules. These rules allow you to express knowledge in a form like:
IF condition(s) THEN result.
In fuzzy logic, each condition is called an antecedent, and the result is the consequent. Antecedents are often based on fuzzy sets, and can involve multiple conditions combined with fuzzy operators such as AND, OR, or NOT.

For example, a rule might look like:
IF temperature is "high" AND humidity is "low" THEN fan speed is "fast".

Each antecedent evaluates to a degree of membership (between 0 and 1), based on how well the input matches the fuzzy set. When combining multiple antecedents, you use fuzzy operators:

  • AND: typically uses the minimum of the membership degrees;
  • OR: typically uses the maximum;
  • NOT: typically uses one minus the membership degree.

This way, the rule's activation can reflect partial truths, not just binary true/false values.

12345678910111213
import numpy as np # Define membership degrees for two fuzzy sets: A and B # Suppose for a given input, A = 0.7 (e.g., temperature is "high" to degree 0.7) # and B = 0.4 (e.g., humidity is "low" to degree 0.4) A = 0.7 B = 0.4 # Fuzzy rule: IF A AND B THEN C # Use the minimum t-norm for AND rule_activation = np.minimum(A, B) print("Activation degree of the rule (IF A AND B THEN C):", rule_activation)
copy

The computed activation, in this case 0.4, indicates the degree to which the rule applies for the given inputs. This value tells you how strongly the combined antecedent conditions are satisfied. In fuzzy systems, this activation degree is then used to determine the influence of the rule's consequent (e.g., how much "fan speed is fast" should be applied). Lower activation means the rule is less applicable, while higher activation means it is more relevant for the current situation.

question mark

Which statement about fuzzy if–then rules is correct?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 3

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

bookComposing Fuzzy If–Then Rules

Glissez pour afficher le menu

To build decision-making systems with fuzzy logic, you use fuzzy if–then rules. These rules allow you to express knowledge in a form like:
IF condition(s) THEN result.
In fuzzy logic, each condition is called an antecedent, and the result is the consequent. Antecedents are often based on fuzzy sets, and can involve multiple conditions combined with fuzzy operators such as AND, OR, or NOT.

For example, a rule might look like:
IF temperature is "high" AND humidity is "low" THEN fan speed is "fast".

Each antecedent evaluates to a degree of membership (between 0 and 1), based on how well the input matches the fuzzy set. When combining multiple antecedents, you use fuzzy operators:

  • AND: typically uses the minimum of the membership degrees;
  • OR: typically uses the maximum;
  • NOT: typically uses one minus the membership degree.

This way, the rule's activation can reflect partial truths, not just binary true/false values.

12345678910111213
import numpy as np # Define membership degrees for two fuzzy sets: A and B # Suppose for a given input, A = 0.7 (e.g., temperature is "high" to degree 0.7) # and B = 0.4 (e.g., humidity is "low" to degree 0.4) A = 0.7 B = 0.4 # Fuzzy rule: IF A AND B THEN C # Use the minimum t-norm for AND rule_activation = np.minimum(A, B) print("Activation degree of the rule (IF A AND B THEN C):", rule_activation)
copy

The computed activation, in this case 0.4, indicates the degree to which the rule applies for the given inputs. This value tells you how strongly the combined antecedent conditions are satisfied. In fuzzy systems, this activation degree is then used to determine the influence of the rule's consequent (e.g., how much "fan speed is fast" should be applied). Lower activation means the rule is less applicable, while higher activation means it is more relevant for the current situation.

question mark

Which statement about fuzzy if–then rules is correct?

Select the correct answer

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 3
some-alt