draw_confusion_matrix() missing 2 required positional arguments: 'label_name' and 'normlize'
时间: 2024-02-01 11:02:30 浏览: 27
根据你提供的错误信息,`draw_confusion_matrix()` 函数缺少两个必需的位置参数:`label_name` 和 `normalize`。
这个错误是因为在调用 `draw_confusion_matrix()` 函数时没有正确传递这两个参数。确保在调用函数时提供了正确的参数。
例如,你可以修改调用 `draw_confusion_matrix()` 函数的代码如下:
```python
draw_confusion_matrix(label_true=y_gt,
label_pred=y_pred,
label_name=labels_name, # 提供正确的 "label_name" 参数值
normalize=True, # 提供正确的 "normalize" 参数值
title="Confusion Matrix on Fer2013",
pdf_save_path="Confusion_Matrix_on_Fer2013.jpg",
dpi=300)
```
请注意,这只是一个示例,你可能需要根据你的具体需求和数据进行相应的修改。确保正确提供函数所需的所有参数。