JohnLangford/vowpal_wabbit — pull request #35 by arielf (2012-06-28 06:40:04+00:00)
Title: request to pull 'arielf' latest commit: a single new file: utl/vw-importance

new file: utl/vw-importance: describe dataset features: hashes, weights & relative feature-importance

This is a little script which prints input-feature data:

full-feature-name, hash-value, weight, relative importance

given a training-set as input.

It may still need some improvements, but is working pretty well for me in its current form.
It has some comand-line options (call without args to get usage/help)

This has been requested by several people on the list in the past. I finally found time to write it.

Example output given a synthetic training set where a, b, c, d are random variables and:

label = a + 2b +3c +4d

with namespaces 'foo' and 'BAR' (just to test namespaces are handled correctly)

$ vw-importance zz.train
FeatureName HashVal Weight Importance
^d 193030 +4.0000 100.00%
BAR^c 39027 +3.0000 75.00%
foo^b 146003 +2.0000 50.00%
foo^a 43272 +1.0000 25.00%
Constant 116060 -0.0000 0.00%

I hope people find this useful.
Comments and suggestions for improvements very welcome.

Thanks!