我必须为 SVM 分类器绘制一个图表。这是我用来绘制的代码:
plt.contour(xx, yy, Z)
这里xx和yy是功能,Z是标签。这些标签位于字符串中。当我运行代码时出现错误
xx
yy
Z
ValueError: could not convert string to float: dog
我怎样才能绘制这个图表?
matplotlib contour
contour ×1
matplotlib ×1