Closed prem1215 closed 5 years ago
I have solved the problem, we only need:
print("{} % {}!".format(round(y_output[0,label]*100,2), labelencoder.inverse_transform([label])[0]))
Because the inverse transform requires that we pass in an array
@WeiYangBin thank you so much for this. However, one thing to note is that this only works if the scikit-learn
version is 0.21.1
ValueError Traceback (most recent call last)