Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utl
diff options
context:
space:
mode:
authorariel faigon <github.2009@yendor.com>2014-06-11 02:26:44 +0400
committerariel faigon <github.2009@yendor.com>2014-06-11 02:26:44 +0400
commit90fb4abbbf99c20235c9b6332370afc34cc38e74 (patch)
tree463ae984751215d01b46bbf5686a9961a67ddaea /utl
parentababff18f200e70dd0c67ff104693c320f7c6497 (diff)
Avoid uninitialized warnings on too few features or deviant examples
Diffstat (limited to 'utl')
-rwxr-xr-xutl/vw-top-errors2
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;