Calculate the score on each row and return the mean score. :return: The mean score
(self)
| 41 | raise NotImplementedError("Eval function not implemented") |
| 42 | |
| 43 | def eval_score(self) -> float: |
| 44 | """ |
| 45 | Calculate the score on each row and return the mean score. |
| 46 | :return: The mean score |
| 47 | """ |
| 48 | # filter out the discarded samples |
| 49 | self.dataset = self.dataset[(self.dataset['prediction'] != 'Discarded') & |
| 50 | (self.dataset['annotation'] != 'Discarded')] |
| 51 | self.dataset = self.score_func(self.dataset) |
| 52 | self.mean_score = self.dataset['score'].mean() |
| 53 | return self.mean_score |
| 54 | |
| 55 | def get_max_score(self, warmup=0): |
| 56 | """ |