DummyVariable
A dummy variable, also known as an indicator variable, is a numerical variable that represents the presence or absence of a qualitative attribute. It takes values 0 or 1 and is used to include categorical data in statistical models and machine learning algorithms.
In data preparation, a categorical variable with k categories is commonly represented by k-1 dummy variables
In regression and similar models, the coefficient on a dummy variable expresses the expected difference in
Example: for a categorical variable Color with Red, Green, and Blue, two dummies might be Color_Green and
Dummy variables can be used in interaction terms to explore whether the effect of a predictor varies