diff options
author | ariel faigon <github.2009@yendor.com> | 2014-06-11 02:26:44 +0400 |
---|---|---|
committer | ariel faigon <github.2009@yendor.com> | 2014-06-11 02:26:44 +0400 |
commit | 90fb4abbbf99c20235c9b6332370afc34cc38e74 (patch) | |
tree | 463ae984751215d01b46bbf5686a9961a67ddaea /utl | |
parent | ababff18f200e70dd0c67ff104693c320f7c6497 (diff) |
Avoid uninitialized warnings on too few features or deviant examples
Diffstat (limited to 'utl')
-rwxr-xr-x | utl/vw-top-errors | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utl/vw-top-errors b/utl/vw-top-errors index 7fb12814..15ffa5ce 100755 --- a/utl/vw-top-errors +++ b/utl/vw-top-errors @@ -220,6 +220,8 @@ sub audit_top_weights($$@) { printf "\t%s\t%-8s\t%s\n", 'Feature', 'Weight', 'Full-audit-data'; for (my $i = 0; $i < $TopWeights; $i++) { my $feature = $sorted_features[$i]; + next unless (defined $feature); + my ($name, $hash, $value, $weight) = split(':', $feature); $weight =~ s/\@.*$//; printf "\t%s\t%7.6f\t%s\n", $name, $weight, $feature; |