Module: Lernen::Algorithm::KearnsVazirani

Defined in:
lib/lernen/algorithm/kearns_vazirani.rb,
lib/lernen/algorithm/kearns_vazirani/discrimination_tree.rb,
lib/lernen/algorithm/kearns_vazirani/kearns_vazirani_learner.rb

Overview

KearnzVazirani provides an implementation of Kearnz-Vazirani algorithm.

Kearns-Vazirani is introduced by [Kearns & Vazirani (1994) “An Introduction to Computational Learning Theory”](direct.mit.edu/books/monograph/2604/An-Introduction-to-Computational-Learning-Theory).

Defined Under Namespace

Classes: DiscriminationTree, KearnsVaziraniLearner

Class Method Summary collapse

Class Method Details

.learn(alphabet, sul, oracle, automaton_type:, cex_processing: :binary, max_learning_rounds: nil) ⇒ Object

Runs Kearns-Vazirani algorithm and returns an inferred automaton.

: [In] (

  Array[In] alphabet, System::SUL[In, bool] sul, Equiv::Oracle[In, bool] oracle,
  automaton_type: :dfa,
  ?cex_processing: cex_processing_method, ?max_learning_rounds: Integer | nil
) -> Automaton::DFA[In]

: [In, Out] (

  Array[In] alphabet, System::SUL[In, Out] sul, Equiv::Oracle[In, Out] oracle,
  automaton_type: :mealy,
  ?cex_processing: cex_processing_method, ?max_learning_rounds: Integer | nil
) -> Automaton::Mealy[In, Out]

: [In, Out] (

  Array[In] alphabet, System::SUL[In, Out] sul, Equiv::Oracle[In, Out] oracle,
  automaton_type: :moore,
  ?cex_processing: cex_processing_method, ?max_learning_rounds: Integer | nil
) -> Automaton::Moore[In, Out]


31
32
33
34
35
36
37
38
39
40
41
# File 'lib/lernen/algorithm/kearns_vazirani.rb', line 31

def self.learn( # steep:ignore
  alphabet,
  sul,
  oracle,
  automaton_type:,
  cex_processing: :binary,
  max_learning_rounds: nil
)
  learner = KearnsVaziraniLearner.new(alphabet, sul, automaton_type:, cex_processing:)
  learner.learn(oracle, max_learning_rounds:)
end