Extract the errors from the dataset :return: records that contains the errors
(self)
| 126 | 'errors': self.errors, 'confusion_matrix': conf_matrix, 'analysis': analysis['text']}) |
| 127 | |
| 128 | def extract_errors(self) -> pd.DataFrame: |
| 129 | """ |
| 130 | Extract the errors from the dataset |
| 131 | :return: records that contains the errors |
| 132 | """ |
| 133 | df = self.dataset |
| 134 | err_df = df[df['score'] < self.error_threshold] |
| 135 | err_df.sort_values(by=['score']) |
| 136 | self.errors = err_df |
| 137 | return self.errors |
| 138 | |
| 139 | def extract_correct(self) -> pd.DataFrame: |
| 140 | """ |