Module: FpGrowth

Defined in:
lib/fpgrowth.rb,
lib/fpgrowth/miner.rb,
lib/fpgrowth/fp_tree.rb,
lib/fpgrowth/version.rb,
lib/fpgrowth/fp_tree/node.rb,
lib/fpgrowth/miner/pattern.rb,
lib/fpgrowth/fp_tree/builder.rb,
lib/fpgrowth/fp_tree/header_table.rb,
lib/fpgrowth/fp_tree/bonzai_secateur.rb,
lib/fpgrowth/fp_tree/builder/first_pass.rb,
lib/fpgrowth/fp_tree/builder/second_pass.rb,
lib/fpgrowth/miner/pattern_base_extractor.rb,
lib/fpgrowth/miner/conditional_tree_builder.rb,
lib/fpgrowth/fp_tree/builder/header_table_builder.rb

Defined Under Namespace

Modules: FpTree, Miner

Constant Summary collapse

VERSION =
"1"

Class Method Summary collapse

Class Method Details

.fp_growth(transactions, threshold = 1) ⇒ Object



10
11
12
13
# File 'lib/fpgrowth.rb', line 10

def self.fp_growth(transactions, threshold=1)
  fp_tree = FpTree.build(transactions, threshold)
  Miner.fp_growth(fp_tree)
end

.mine(transactions, threshold = 1) ⇒ Object



6
7
8
# File 'lib/fpgrowth.rb', line 6

def self.mine(transactions, threshold=1)
  td_fp_growth(transactions, threshold)
end

.td_fp_growth(transactions, threshold = 1) ⇒ Object



15
16
17
18
# File 'lib/fpgrowth.rb', line 15

def self.td_fp_growth(transactions, threshold=1)
  fp_tree = FpTree.build(transactions, threshold)
  Miner.td_fp_growth(fp_tree)
end