top of page

Deep Learning Tips how to use to_categorical for one hot encoding in TensorFlow

Updated: Jul 24, 2023

TensorFlow requires us to pay attention to how we put out categorical classification target into our model. The to_categorical function in TensorFlow works in a similar way to the get_dummies function in Pandas. And on a DataFrame can be used as a substitute. Hot one encoding with TensorFlow requires use to give integers as our class. If we use an sklearn preprocessing LabelEncoder and can then return these integers back into the original classes.











Follow Data Science Teacher Brandyn





dataGroups:












47 views0 comments

Recent Posts

See All

Commentaires

NotƩ 0 Ʃtoile sur 5.
Pas encore de note

Ajouter une note
bottom of page