'LabelBinarizer() Use for csv file
In this code , I did not understand why this function was used and what is its purpose. I read its explanation and searched a lot, but I did not understand. Can you explain in simple terms what he did and why? https://www.kaggle.com/code/vishwasgpai/guide-for-creating-cnn-model-using-csv-file/notebook
from sklearn import preprocessing
lb = preprocessing.LabelBinarizer()
y_train = lb.fit_transform(y_train)
y_test = lb.fit_transform(y_test)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|