1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-02 19:49:11 +00:00

Decrease the default feature variance when unknown.

This commit is contained in:
david
2012-01-17 20:33:20 +00:00
parent 6ca2b871b6
commit 4b3bfeb7d9

View File

@@ -947,9 +947,10 @@ static double novelty_of(const struct feature_node *features, int label) {
d = features[i].value - means[i];
v = variances[i];
if (v == 0.0) {
/* No variance? It means that samples were identical. Substitute a sample
variance. */
v = 1.0;
/* No variance? It means that samples were identical. Substitute a default
variance. This will tend to make novelty large in these cases, which
will hopefully encourage for submissions for this class. */
v = 0.01;
}
sum += d * d / v;
}