One-hot Encoding
β Turn the categorical values into numerical
β Counted in correlation calculations
β Compatible for the model
β Create dummy variables: one label is turned into a π-dimensional vector
β N is the number of all different values the categorical variable has
e.g. Column 2: ππΆπ, ππ·π, πΌπΆππ β 1,0,0 , 0,1,0 , 0,0,1
β Each record has all 0π , except in one dimension that it has 1
β .get_dummies method: move categorical values at the end and expand them into
vectors
17