CST383 - Week 7
CST383 - Week 7 The final week of this course! This week, I learned about how to create logistic regression models, as well as understanding overfitting and how to reduce the effects of it. We also learned how to encode categorical variables. One-hot encoding is what I've used for a number of homework problems. It does not create new columns unlike using dummy variables, and encodes two-value nominal variables with 1 or 0. One example is "sex", where a one-hot encoded version would be recreating the column as "sex_female" with 1 == female and 0 == male. For ordinal variables, replace the variables with increasing order, like "spicy". This can be convert the possible values of "spicy" into dummy variables "spicy_none", "spicy_mild", "spicy_hot", and "spicy_extra". We can encode as many columns as needed, as long as the number of rows >= the number of columns squared. Logistic regression models are cre...