137 - What is one hot encoding in machine learning?

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Grate video as always. If you guys are using pandas library for your data preprocessing you can use their get_dummies() function that will convert whatever categorical columns you want into one hot encoded.
import pandas as pd
df = pd.read_csv(“file path”)
one_hot_encoded = column”])
It’s just a rough sketch but you can read more about it in pandas documentation. Plus if you’re let’s say using TensorFlow you can split your data into training and testing and feed it directly into network, because pandas runs on top of numpy and TensorFlow know hot to deal with numpy.

andrewmamchyn
Автор

I converted my image that had 2 label into one-hot, ie (0, 1, 2), but when I removed the first one, because I thought it was unnecessary (redundant, it presented the background), the model did not converge... my model only converges if I send all 3, including the background... does that make sense?

diegostaubfelipe
Автор

Thank you for the informative tutorial. I am learning deep learning using tensorflow as backend. May I ask whether it is really necessary to use one-hot encoding in training multiclass model? Since I understood in tensorflow there are sparsecategoricalcrossentropy (for non one-hot label) and categoricalcrossentropy (for one-hot label) for loss calculation. Hence I have an impression that both type of data structures are acceptable? Or is there a large difference in training performance? Thanks again

minipc
Автор

So what is the use if we train our model with this rather than a number... Will it be beneficial

pavankrishnateja
Автор

Very informative videos sir. Can you please explain how to generate binary masks for segmentation of microscopic images.

shilpashree
welcome to shbcf.ru