Understand the foundation of rule learning: rule structure, logical components, propositional vs first-order rules, and conflict resolution strategies.
Rules in rule learning follow the fundamental structure: "if (rule body) then (rule head)". The rule body is a conjunction (AND combination) of logical literals, and the rule head is the target concept or class label.
Where:
Credit approval rule:
This rule states: "If income is at least $50,000 AND credit score is at least 700, then approve the loan."
Atomic formulas are the basic building blocks of rules. They represent simple conditions or predicates that can be evaluated as true or false.
Examples:
Logical connectives combine atomic formulas to form complex conditions:
AND (∧)
Conjunction: Both conditions must be true. Default in rule body.
OR (∨)
Disjunction: At least one condition must be true.
NOT (¬)
Negation: Condition must be false.
Example:
All three conditions must be satisfied: income ≥ $50k AND credit_score ≥ 700 AND no bankruptcy.
Rules are classified into two main types based on the data they can handle:
Handle attribute-value data (tabular data). No variables, directly based on attribute values.
Example:
Characteristics:
Handle relational data. Contain variables and predicates, describing relationships between entities.
Example:
Characteristics:
Propositional Rules:
First-Order Rules:
A rule set is a collection of rules that work together to make predictions. When multiple rules apply to the same sample, conflict resolution strategies determine which rule's prediction to use.
Rules are evaluated in a fixed order. The first matching rule's prediction is used. This is the most common approach in sequential covering algorithms.
A default rule (usually the majority class) is used when no specific rule matches. Ensures every sample gets a prediction.
Higher-level rules that determine which lower-level rule to apply based on context or rule characteristics (e.g., accuracy, coverage).
Apply rule learning to credit approval decisions. Learn a rule set that classifies loan applications as approve or reject based on applicant attributes.
| Rule ID | Rule | Coverage | Accuracy |
|---|---|---|---|
| 1 | IF income ≥ $50,000 AND credit_score ≥ 700 THEN approve | High | 92% |
| 2 | IF income < $30,000 OR debt_ratio > 0.5 THEN reject | Medium | 88% |
| 3 | IF employment_years ≥ 2 AND credit_score ≥ 650 THEN approve | Medium | 85% |
Rules are evaluated in order (1 → 2 → 3). If no rule matches, default to reject. Rule 1 has highest priority and covers high-quality applicants.
The rule set covers most positive examples (approve cases). Rule 1 handles high-income applicants, Rule 3 handles stable employment cases.
Each rule body contains only necessary conditions. Removing any literal would reduce accuracy or coverage.
Each rule is human-readable and explainable. Loan officers can understand why an application was approved or rejected, enabling transparent decision-making.
Apply rule learning to medical diagnosis. Learn rules that predict disease presence based on patient symptoms.
If patient has fever, cough, and body ache, diagnose as flu.
If patient has fever, cough, chest pain, and is 65 or older, diagnose as pneumonia.
If patient has cough and sneezing but no fever, diagnose as common cold.
Rules are ordered by specificity (most specific first). If multiple rules match, the most specific rule's diagnosis is used. If no rule matches, default to "healthy" or request additional tests.