RTUComputer ScienceYr 2024 · Sem 62024

Q5Machine Learning

Question

2 marks

What is one-hot encoding?

Answer

One-hot encoding is an absolute architectural requirement for mathematically translating categorical string variables into orthogonal binary vectors that a machine learning algorithm can process.

Algorithms cannot multiply the word "Red". One-Hot Encoding violently expands a categorical column with unique labels into separate binary columns. "Red" becomes [1, 0, 0], "Green" becomes [0, 1, 0]. This prevents the algorithm from mathematically assuming false ordinal relationships (e.g., assuming Green > Red).

Back to Paper