Rule-Based Systems
Knowledge Base
Expert systems
Table 2.5: Main advantages and disadvantages of rule-based systems
In this lesson, you will be introduced to
Iteration 1
Figure 2.8: Medical diagnosis by Rule-based AI System
This first rule-based system will follow a simple rule:
You can then test this function with three different patients:
This version has no hard-coded IF statements.
Figure 2.11: Representation of the second iteration
The threshold-based logic on the number of symptoms
For each possible disease included in the knowledge base,
The final column includes the diagnosis made by the human expert.
You now have 1,400 data points that will be used for training the
The plot_tree() function is used to visualize a decision tree.
You will now use this decision tree to predict the most likely diagnosis for the patients in the testing set.
Figure 2.14: Confusion matrix of predicted and actual cases
What are some advantages and disadvantages of rule-based systems?
What is an advantage and a disadvantage of the first iteration?
Add a patient to your code in the first iteration of the rule-based
In the second iteration, how many diseases does each patient's
In the third iteration, change both weights to 1 for patients 1 and 2,
Describe briefly how each iteration is enhanced from the previous one (first to second, second to third, third to fourth).