MCPcopy
hub / github.com/QData/TextAttack / calculate

Method calculate

textattack/metrics/metric.py:20–27  ·  view source on GitHub ↗

Abstract function for computing any values which are to be calculated as a whole during initialization Args: results (``AttackResult`` objects): Attack results for each instance in dataset

(self, results)

Source from the content-addressed store, hash-verified

18
19 @abstractmethod
20 def calculate(self, results):
21 """Abstract function for computing any values which are to be calculated as a whole during initialization
22 Args:
23 results (``AttackResult`` objects):
24 Attack results for each instance in dataset
25 """
26
27 raise NotImplementedError

Callers 5

augmentMethod · 0.45
log_summaryMethod · 0.45
test_perplexityFunction · 0.45
test_useFunction · 0.45
test_metric_recipeFunction · 0.45

Calls

no outgoing calls

Tested by 3

test_perplexityFunction · 0.36
test_useFunction · 0.36
test_metric_recipeFunction · 0.36