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

  • 28Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Rule-Based ML Fundamentals

What is a rule in rule-based machine learning?

28 questions

  1. 1

    What is a rule in rule-based machine learning?

    1. A

      A decision tree path from root to leaf

    2. B

      An IF-THEN expression that captures a conditional mapping between features and the target outcome

    3. C

      A mathematical equation representing the entire dataset

    4. D

      A set of parameters for a neural network

    Correct answer
    B

    An IF-THEN expression that captures a conditional mapping between features and the target outcome

    Explanation

    A rule is an IF-THEN expression: condition (IF part) and action (THEN part) that predicts the outcome when conditions are met.

  2. 2

    How does rule-based machine learning model the problem space?

    1. A

      By building an ensemble of complete models and averaging their predictions

    2. B

      By partitioning the problem space into regions, each captured by a single rule

    3. C

      By fitting a single global function to all data

    4. D

      By creating a hierarchical tree structure

    Correct answer
    B

    By partitioning the problem space into regions, each captured by a single rule

    Explanation

    Rule-based ML models the problem space piecewise, where each rule covers a region of the space and the rule set as a whole makes predictions.

  3. 3

    Which of the following is NOT a type of rule-based algorithm mentioned in the video?

    1. A

      Learning classifier systems

    2. B

      Artificial immune systems

    3. C

      Support vector machines

    4. D

      Association rule mining

    Correct answer
    C

    Support vector machines

    Explanation

    The video mentions association rule mining, artificial immune systems, and learning classifier systems as rule-based algorithms. Support vector machines are not rule-based.

  4. 4

    What symbol is used to represent a wildcard in LCS rules?

    1. A

    2. B

      ?

    3. C

      @

    4. D
    Correct answer
    A

    Explanation

    Traditionally, LCS algorithms use the hash symbol (#) to represent wildcards, meaning the rule ignores that feature.

  5. 5

    What does LCS stand for and what is a better descriptive name mentioned?

    1. A

      Local Classifier Set; instance-based rule learner

    2. B

      Learning Control System; adaptive rule learner

    3. C

      Learning Classifier Systems; evolutionary rule set learner

    4. D

      Linear Classification System; linear rule set learner

    Correct answer
    C

    Learning Classifier Systems; evolutionary rule set learner

    Explanation

    LCS stands for Learning Classifier Systems, but a better name is 'evolutionary rule set learner' because it uses evolutionary algorithms to discover rule sets.

  6. 6

    What type of algorithm drives rule discovery in LCS?

    1. A

      k-nearest neighbors

    2. B

      Gradient descent

    3. C

      A simple genetic algorithm (evolutionary algorithm)

    4. D

      Naive Bayes

    Correct answer
    C

    A simple genetic algorithm (evolutionary algorithm)

    Explanation

    Rule discovery in LCS is typically driven by an evolutionary algorithm such as a basic genetic algorithm, inspired by neo-Darwinian evolution.

  7. 7

    In LCS, what is the difference between a rule and a classifier?

    1. A

      There is no difference; the terms are used interchangeably

    2. B

      A rule includes the condition; a classifier includes the action only

    3. C

      A classifier is the entire rule set; a rule is a single condition

    4. D

      A classifier is a rule linked to its tracked parameters; a rule is just the condition-action pair

    Correct answer
    D

    A classifier is a rule linked to its tracked parameters; a rule is just the condition-action pair

    Explanation

    A classifier is a rule plus its associated parameters (numerosity, match count, accuracy, fitness, etc.). A rule alone is just the condition and action.

  8. 8

    What does population-based search mean in the context of LCS?

    1. A

      The algorithm searches multiple datasets simultaneously

    2. B

      Multiple models are trained in parallel and ensembled

    3. C

      The algorithm searches all possible rules exhaustively

    4. D

      A population of candidate solutions (rules) is explored, but only one subset of rules forms the final model

    Correct answer
    D

    A population of candidate solutions (rules) is explored, but only one subset of rules forms the final model

    Explanation

    LCS employs population-based search where a population of candidate rules is evolved, and the final model is a subset of these rules.

  9. 9

    Which of the following is an advantage of LCS over decision trees?

    1. A

      Always produces interpretable models

    2. B

      Better suited for modeling complex multivariate feature interactions and heterogeneous associations

    3. C

      Requires no hyperparameter tuning

    4. D

      Guarantees convergence to the global optimum

    Correct answer
    B

    Better suited for modeling complex multivariate feature interactions and heterogeneous associations

    Explanation

    LCS is well-suited for modeling complex multivariate interactions and heterogeneous associations, which many algorithms including decision trees struggle with.

  10. 10

    Which of the following is a disadvantage of LCS?

    1. A

      Requires large amounts of training data to avoid overfitting

    2. B

      Cannot handle categorical features

    3. C

      High computational expense compared to many other algorithms

    4. D

      Only works for binary classification

    Correct answer
    C

    High computational expense compared to many other algorithms

    Explanation

    LCS can be computationally expensive due to its evolutionary nature. It can handle categorical features and multi-class classification, and overfitting is addressed through generalization pressures.

  11. 11

    How does LCS handle heterogeneous associations?

    1. A

      By allowing different rules to capture different patterns in different parts of the problem space

    2. B

      By using a single global model

    3. C

      By transforming features to remove heterogeneity

    4. D

      By assuming all associations are linear

    Correct answer
    A

    By allowing different rules to capture different patterns in different parts of the problem space

    Explanation

    LCS models the problem space piecewise, so different rules can capture different association patterns, making it well-suited for heterogeneous associations.

  12. 12

    In the LCS training cycle, what is the first step after shuffling the data?

    1. A

      Compute the prediction array

    2. B

      Grab the next instance from the training data

    3. C

      Apply the genetic algorithm

    4. D

      Initialize the rule population randomly

    Correct answer
    B

    Grab the next instance from the training data

    Explanation

    After shuffling the data, the first step of each learning iteration is to grab one instance from the training data.

  13. 13

    What is the match set in LCS?

    1. A

      The set of all rules in the population that have the highest fitness

    2. B

      The subset of the rule population whose conditions are satisfied by the current training instance

    3. C

      The set of rules that predict the correct class

    4. D

      The set of rules that are selected for deletion

    Correct answer
    B

    The subset of the rule population whose conditions are satisfied by the current training instance

    Explanation

    The match set consists of all rules in the population whose condition part is satisfied by the current training instance's feature values.

  14. 14

    After the match set is formed, how is it further split?

    1. A

      Into a set for crossover and a set for mutation

    2. B

      Into a training set and a validation set

    3. C

      Into a matching set and a non-matching set

    4. D

      Into a correct set (rules predicting the correct class) and an incorrect set (rules predicting the wrong class)

    Correct answer
    D

    Into a correct set (rules predicting the correct class) and an incorrect set (rules predicting the wrong class)

    Explanation

    The match set is split into a correct set (C) of rules that predicted the correct class for the current instance and an incorrect set (I) of rules that predicted incorrectly.

  15. 15

    When is the covering mechanism activated in LCS?

    1. A

      When the population size exceeds the maximum

    2. B

      When the correct set is empty, meaning no rule matches and predicts correctly

    3. C

      Only during the first training iteration

    4. D

      At the beginning of every training iteration

    Correct answer
    B

    When the correct set is empty, meaning no rule matches and predicts correctly

    Explanation

    Covering is activated when the correct set is empty, i.e., no existing rule both matches the instance and predicts the correct class. It generates a new rule that matches and predicts correctly.

  16. 16

    How does the covering mechanism generate a new rule?

    1. A

      By applying the genetic algorithm to the current correct set

    2. B

      By randomly generalizing the current training instance: some features are specified with the instance's values, others become wildcards, and the outcome is set to the instance's class

    3. C

      By combining two existing rules via crossover

    4. D

      By copying an existing rule and mutating it

    Correct answer
    B

    By randomly generalizing the current training instance: some features are specified with the instance's values, others become wildcards, and the outcome is set to the instance's class

    Explanation

    Covering creates a new rule by randomly choosing some features to specify (with values from the instance) and setting the rest as wildcards, and assigning the instance's class as the rule's action.

  17. 17

    Why is covering important for initializing the rule population?

    1. A

      Because it prevents overfitting from the start

    2. B

      Because it reduces computational cost

    3. C

      Because it creates a diverse set of rules with high accuracy

    4. D

      Because it ensures all initial rules match at least one instance, avoiding irrelevant rules

    Correct answer
    D

    Because it ensures all initial rules match at least one instance, avoiding irrelevant rules

    Explanation

    When starting with an empty population, covering generates rules that match instances in the data, so the search is focused on relevant parts of the problem space.

  18. 18

    What happens during parameter updates in LCS?

    1. A

      Rules are assigned new wildcards based on the current instance

    2. B

      All rules in the population have their parameters randomized

    3. C

      Rules in the correct set have their accuracy and fitness increased; rules in the incorrect set have them decreased

    4. D

      Only the rules selected for deletion have their parameters updated

    Correct answer
    C

    Rules in the correct set have their accuracy and fitness increased; rules in the incorrect set have them decreased

    Explanation

    During parameter updates, rules in the correct set receive a boost in accuracy and fitness, while rules in the incorrect set are penalized.

  19. 19

    What is subsumption in LCS?

    1. A

      A method to delete low-fitness rules

    2. B

      A crossover operator that combines two rules

    3. C

      A process to increase the population size

    4. D

      An explicit generalization mechanism where one rule can replace another if it is more general and equally accurate

    Correct answer
    D

    An explicit generalization mechanism where one rule can replace another if it is more general and equally accurate

    Explanation

    Subsumption is an explicit generalization pressure: if rule A fully covers rule B's problem space and has the same accuracy, A can subsume B (B is removed, A's numerosity increases).

  20. 20

    What are the three conditions for one rule to subsume another in LCS?

    1. A

      Same outcome, full coverage of problem space, and equal accuracy

    2. B

      Same outcome, higher fitness, and lower specificity

    3. C

      Same condition, same action, and equal numerosity

    4. D

      Different outcomes, full coverage, and higher numerosity

    Correct answer
    A

    Same outcome, full coverage of problem space, and equal accuracy

    Explanation

    For rule A to subsume rule B: both must have the same outcome, A must fully cover the problem space that B covers, and A must be just as accurate as B.

  21. 21

    How are parent rules selected for the genetic algorithm in LCS?

    1. A

      Randomly from the entire rule population

    2. B

      From the incorrect set, using accuracy-based selection

    3. C

      From the match set, using equal probability

    4. D

      From the correct set, using roulette wheel or tournament selection based on fitness

    Correct answer
    D

    From the correct set, using roulette wheel or tournament selection based on fitness

    Explanation

    Parent rules are selected from the correct set, and selection methods like roulette wheel or tournament selection use rule fitness to give higher-fitness rules a better chance.

  22. 22

    What genetic operators are used in the LCS genetic algorithm?

    1. A

      Selection and recombination

    2. B

      Inversion and duplication

    3. C

      Crossover and mutation

    4. D

      Transposition and deletion

    Correct answer
    C

    Crossover and mutation

    Explanation

    The genetic algorithm uses crossover (exchange of feature specifications between parents) and mutation (randomly generalizing or specifying features) to create offspring.

  23. 23

    When is the deletion mechanism triggered in LCS?

    1. A

      Only when the correct set is empty

    2. B

      After every training iteration

    3. C

      When the genetic algorithm produces too many rules

    4. D

      Whenever the size of the rule population (sum of numerosities) exceeds the user-specified maximum

    Correct answer
    D

    Whenever the size of the rule population (sum of numerosities) exceeds the user-specified maximum

    Explanation

    Deletion is activated when the population size (based on total numerosity) exceeds the maximum allowed. It removes rules to keep the population within limits.

  24. 24

    How is a rule selected for deletion in LCS?

    1. A

      By choosing the rule with the highest numerosity

    2. B

      Probabilistically, with probability inversely proportional to the rule's fitness

    3. C

      Deterministically, removing the lowest-accuracy rule

    4. D

      Randomly, with equal probability among all rules

    Correct answer
    B

    Probabilistically, with probability inversely proportional to the rule's fitness

    Explanation

    Deletion uses roulette wheel selection where the probability of a rule being selected is inversely proportional to its fitness, so less fit rules are more likely to be deleted.

  25. 25

    How does the prediction array make a class decision for new instances?

    1. A

      It averages the predicted probabilities of all rules in the population

    2. B

      It uses a majority vote among rules in the correct set

    3. C

      It selects the rule with the highest fitness and uses its prediction

    4. D

      It considers the match set's rules and their numerosity and fitness to compute support for each class, then chooses the class with the most support

    Correct answer
    D

    It considers the match set's rules and their numerosity and fitness to compute support for each class, then chooses the class with the most support

    Explanation

    The prediction array uses the match set and weights each rule's contribution by its numerosity and fitness to calculate overall support for each class, then picks the class with the highest support.

  26. 26

    What is rule compaction in LCS?

    1. A

      A technique to convert rules into a decision tree

    2. B

      A post-training process that reduces the final rule set to a smaller yet effective set of rules

    3. C

      A mechanism to compress rule conditions into fewer features

    4. D

      A step that merges overlapping rules into one

    Correct answer
    B

    A post-training process that reduces the final rule set to a smaller yet effective set of rules

    Explanation

    After training, rule compaction is applied to limit the final rule set to a smaller subset that still maintains predictive performance, making the model more interpretable.

  27. 27

    What types of data can LCS handle?

    1. A

      Only categorical features and multi-class classification

    2. B

      Only continuous features and regression

    3. C

      Only binary features and binary classification

    4. D

      Binary, categorical, and quantitative features; binary and multi-class classification; regression

    Correct answer
    D

    Binary, categorical, and quantitative features; binary and multi-class classification; regression

    Explanation

    LCS can handle binary, categorical, and quantitative features, and is suited for binary and multi-class classification as well as regression problems.

  28. 28

    How does LCS achieve implicit generalization?

    1. A

      By limiting the number of rules in the population

    2. B

      By explicitly removing overfit rules via subsumption

    3. C

      By using a validation set to prune rules

    4. D

      Simpler rules (with fewer specified features) are more likely to appear in match sets, increasing their chance of being selected as parents

    Correct answer
    D

    Simpler rules (with fewer specified features) are more likely to appear in match sets, increasing their chance of being selected as parents

    Explanation

    Simpler rules appear in match sets more often, giving them more opportunities to be selected as parents in the genetic algorithm, thus encouraging simpler, more general rules.

Question 1 of 28
Question 1 of 28

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent