Method: Ariel::Learner#find_best_rule
- Defined in:
- lib/ariel/learner.rb
#find_best_rule ⇒ Object
Equivalent of LearnDisjunct in STALKER algorithm. Generates initial candidate rules, refines, and then returns a single rule.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/ariel/learner.rb', line 83 def find_best_rule @candidates=[] generate_initial_candidates while true best_refiner = get_best_refiner best_solution = get_best_solution @current_rule = best_refiner break if perfect?(best_solution) refine end # return post_process(best_solution) Log.debug "Rule found: #{best_solution.inspect}" return best_solution end |