plt.savefig 함수에서의 must be real number, not str 오류 발생
아래 캐글 코드를 돌려보다가, 그래프 사진을 저장하는 코드에서 'must be real number, not str'라는 오류가 발생하였다. # https://www.kaggle.com/code/shivamb/semi-supervised-classification-using-autoencoders/notebook def tsne_plot(x1, y1, name="graph.png"): tsne = TSNE(n_components=2, random_state=0) X_t = tsne.fit_transform(x1) plt.figure(figsize=(12, 8)) plt.scatter(X_t[np.where(y1 == 0), 0], X_t[np.where(y1 == 0), 1], marker='o', co..
2024. 1. 9.