Module: FpGrowth::FpTree::Builder
- Defined in:
- lib/fpgrowth/fp_tree/builder.rb,
lib/fpgrowth/fp_tree/builder/first_pass.rb,
lib/fpgrowth/fp_tree/builder/second_pass.rb,
lib/fpgrowth/fp_tree/builder/header_table_builder.rb
Defined Under Namespace
Classes: FirstPass, HeaderTableBuilder, SecondPass
Class Method Summary collapse
Class Method Details
.build(transactions, threshold = 1) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/fpgrowth/fp_tree/builder.rb', line 10 def self.build(transactions, threshold=1) first_pass = FirstPass.new(threshold) supports = first_pass.execute(transactions) second_pass = SecondPass.new(supports, threshold) tree = second_pass.execute(transactions) return tree end |