From 470ec6988a00e77d361115c4bff850fcb12e7539 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(-) 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