

The color of a ball would fall into the categories like "Red", "Green", "Blue" or "Yellow".

Implementing One-Hot encoding in TensorFlow models (tf.one_hot)Ī categorical variable or nominal variable is the one that can have two or more categories, but unlike ordinal variables there is no ordering or ranking given to the categories, or simply we cannot order them in a known or clear way.It is one of the approaches used to prepare categorical data. One-Hot Encoding is a frequently used term when dealing with Machine Learning models particularly during the data pre-processing stage. This article discusses about one of the commonly used data pre-processing techniques in Feature Engineering that is One Hot Encoding and its use in TensorFlow.
