From 141a6cd794442c2bb1e69382d83f5fcebc7d3ab2 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Wed, 30 Nov 2011 14:34:22 +0100 Subject: lplp.rb doc --- dtrain/hstreaming/lplp.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dtrain') diff --git a/dtrain/hstreaming/lplp.rb b/dtrain/hstreaming/lplp.rb index 0ec21a46..40409bbd 100755 --- a/dtrain/hstreaming/lplp.rb +++ b/dtrain/hstreaming/lplp.rb @@ -37,7 +37,7 @@ end def cut(weights, norm_fun, n, epsilon=0.0001) weights.each { |k,v| - if norm_fun.call(v, n).abs > epsilon + if norm_fun.call(v, n).abs >= epsilon puts "#{k}\t#{mean(v, n)}" end } @@ -87,6 +87,10 @@ _test() # actually do something def usage() puts "lplp.rb [n] < " + puts " l0...: norms for selection" + puts "select_k: only output top k (according to the norm of their column vector) features" + puts " cut: output features with weight >= threshold" + puts " n: if we do not have a shard count use this number for averaging" exit end -- cgit v1.2.3