diff options
author | Patrick Simianer <p@simianer.de> | 2011-11-30 14:34:22 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-11-30 14:34:22 +0100 |
commit | 141a6cd794442c2bb1e69382d83f5fcebc7d3ab2 (patch) | |
tree | ff6b1d93a0cecfa3f0375b1a1cb4bc875ced19a9 /dtrain/hstreaming | |
parent | 89cf0569972b2eaf891a5d6d87b530aa52973d11 (diff) |
lplp.rb doc
Diffstat (limited to 'dtrain/hstreaming')
-rwxr-xr-x | dtrain/hstreaming/lplp.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 <l0,l1,l2,linfty,mean,median> <cut|select_k> <k|threshold> [n] < <input>" + 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 |