1 of 16

Executing Decision Rule Algorithms in WEKA

  • Course: Databases and Data Mining
  • Practical Session
  • Instructor: Jamolbek Mattiev

2 of 16

Learning Objectives

  • • Understand rule-based classifiers
  • • Execute rule algorithms in WEKA
  • • Interpret generated rules
  • • Compare algorithm performance

3 of 16

What Are Decision Rules?

  • • IF–THEN classification rules
  • • Easy to interpret
  • • Alternative to decision trees
  • • Human-readable knowledge extraction

4 of 16

Common Rule Algorithms in WEKA

  • • OneR (One Rule)
  • • JRip (RIPPER)
  • • PART (Partial Decision Trees)
  • • DecisionTable

5 of 16

Step 1: Open WEKA Explorer

  • • Launch WEKA
  • • Click Explorer
  • • Load dataset (.arff)
  • • Go to Classify tab

6 of 16

Step 2: Select Rule Algorithm

  • • Click Choose
  • • Select → rules
  • • Choose OneR / JRip / PART

7 of 16

Step 3: Set Evaluation Method

  • • Percentage split (70%)
  • or
  • • 10-fold cross-validation

8 of 16

Step 4: Execute Algorithm

  • • Click Start
  • • Observe generated rules
  • • Record accuracy
  • • Analyze confusion matrix

9 of 16

Understanding Output

  • • Generated IF–THEN rules
  • • Number of rules
  • • Accuracy (%)
  • • Kappa statistic

10 of 16

Example Rule (JRip)

  • IF Outlook = Sunny AND Humidity = High
  • THEN Play = No
  • ELSE Play = Yes

11 of 16

Comparison Criteria

  • • Accuracy
  • • Number of rules
  • • Model interpretability
  • • Computational cost

12 of 16

Advantages of Rule-Based Models

  • • Transparent
  • • Easy to explain
  • • Suitable for knowledge discovery

13 of 16

Limitations

  • • Can overfit
  • • Sensitive to noise
  • • May generate many rules

14 of 16

Discussion Questions

  • • Which algorithm performs best?
  • • Which produces simpler rules?
  • • When prefer rules over trees?

15 of 16

Summary

  • • Rule algorithms produce IF–THEN models
  • • Easy to implement in WEKA
  • • Performance varies by dataset
  • • Compare using validation methods

16 of 16

Example Performance Comparison of Rule Algorithms