Return the maximum 'mean score' (with respect to all history epochs, starting form warmup, up to last) and the epoch index of the maximum score :return: The epoch index of the maximum score, and the maximum score
(self, warmup=0)
| 53 | return self.mean_score |
| 54 | |
| 55 | def get_max_score(self, warmup=0): |
| 56 | """ |
| 57 | Return the maximum 'mean score' (with respect to all history epochs, starting form warmup, up to last) and the epoch index of the maximum score |
| 58 | :return: The epoch index of the maximum score, and the maximum score |
| 59 | """ |
| 60 | max_idx = np.argmax([epoch['score'] for epoch in self.history[warmup:-1]]) |
| 61 | max_idx += warmup |
| 62 | return max_idx, self.history[max_idx]['score'] |
| 63 | |
| 64 | |
| 65 | def large_error_to_str(self, error_df: pd.DataFrame, num_large_errors_per_label: int) -> str: |