Browse Source

fix bug of formula of coverage metrics

tags/v1.3.0
ZhidanLiu 4 years ago
parent
commit
551f5a6a69
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mindarmour/fuzz_testing/model_coverage_metrics.py

+ 3
- 3
mindarmour/fuzz_testing/model_coverage_metrics.py View File

@@ -174,8 +174,8 @@ class ModelCoverageMetrics:

def get_nbc(self):
"""
Get the metric of 'neuron boundary coverage' :math` NBC =(|UpperCornerNeuron|
+ |LowerCornerNeuron|/(2*|N|)`, where :math`|N|` is the number of neurons,
Get the metric of 'neuron boundary coverage' :math:`NBC = (|UpperCornerNeuron|
+ |LowerCornerNeuron|)/(2*|N|)`, where :math`|N|` is the number of neurons,
NBC refers to the proportion of neurons whose neurons output value in
the test dataset exceeds the upper and lower bounds of the corresponding
neurons output value in the training dataset.
@@ -192,7 +192,7 @@ class ModelCoverageMetrics:
def get_snac(self):
"""
Get the metric of 'strong neuron activation coverage'.
:math` SNAC =|UpperCornerNeuron| / |N|`. SNAC refers to the proportion
:math:`SNAC = |UpperCornerNeuron|/|N|`. SNAC refers to the proportion
of neurons whose neurons output value in the test set exceeds the upper
bounds of the corresponding neurons output value in the training set.



Loading…
Cancel
Save