1. Home
  2. Explore
  3. Computer Science
  4. Rule-Based Machine Learning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Rule-Based Machine Learning

Speaker 1Speaker 2

Rule-Based Machine Learning

3:21
0:00-3:21
  1. Anna

    Hey Simon, have you ever heard of rule-based machine learning? It's not as popular as neural networks, but it's really interesting for biomedical data.

  2. Simon

    I've heard of decision trees, but rule-based? Isn't that just a bunch of if-then statements? How would that work for modeling?

  3. Anna

    Exactly! A rule is basically an IF condition THEN outcome statement. For example, if a genetic feature is 0 and BMI is less than 20, then predict control. But the model is a set of rules, each covering a piece of the problem space.

  4. Simon

    So it's like breaking the data into regions? That sounds like a decision tree, but I guess trees are hierarchical. What's special about rule-based methods?

  5. Anna

    One key advantage is interpretability. Also, they handle complex interactions and heterogeneous associations well. There's a family called Learning Classifier Systems, or LCS, that uses evolutionary algorithms to discover rules.

  6. Simon

    Evolutionary algorithms? Like genetic algorithms? So they evolve rules over time? But what are the downsides?

  7. Anna

    Right. Downsides include being less known, fewer software packages, and they can be computationally expensive. Also, there's little theoretical proof they converge, but empirically they work well.

  8. Simon

    That makes sense. So how does training an LCS actually work? I imagine it's iterative.

  9. Anna

    Yes, it cycles through the data one instance at a time. First, we grab an instance and match it against all rules in the population. Matching checks if the rule's conditions are satisfied by that instance.

  10. Simon

    And then we form a match set of rules that match. But what if no rules match? Or if they match but predict wrong?

  11. Anna

    We split the match set into correct and incorrect sets based on whether the rule's prediction matches the true class. If the correct set is empty, we activate a covering mechanism that randomly generates a new rule that matches the instance and predicts correctly.

  12. Simon

    That sounds like a way to bootstrap the population. Then we update parameters like accuracy and fitness for all matched rules?

  13. Anna

    Exactly. Correct rules get a boost, incorrect get penalized. Then there's an explicit generalization step called subsumption where a more general rule can absorb a more specific one if they're equally accurate. That helps prevent overfitting.

  14. Simon

    Interesting. And then the genetic algorithm comes in for rule discovery?

  15. Anna

    Yes. We select two parent rules from the correct set, usually fitter ones have higher chance. Then we apply crossover and mutation to create offspring rules, which are added to the population. This introduces new variation.

  16. Simon

    But the population can't grow indefinitely, right? There must be a deletion mechanism.

  17. Anna

    Right. When the population exceeds a maximum size, we delete rules probabilistically, with less fit rules more likely to be removed. The cycle repeats until a stopping criterion, like a maximum number of iterations.

  18. Simon

    So after training, we have a population of rules. But do we use all of them for predictions?

  19. Anna

    Often we apply rule compaction to prune the set. Then for a new instance, we find the match set and use a prediction array that considers the fitness and numerosity of rules supporting each class. The class with more support wins.

  20. Simon

    That's quite a process. But it seems very flexible, especially for biomedical data with complex interactions. Where can I learn more?

  21. Anna

    There's a great 12-minute animated video on YouTube, and a textbook by Urbanowicz and Brown. Also, scikit-learn compatible implementations are available on their lab's GitHub.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent