How to retrieve coefficient names after label encoding and one hot encoding on scikit-learn?
- 阅读更多 关于 How to retrieve coefficient names after label encoding and one hot encoding on scikit-learn?
问题 I am running a machine learning model (Ridge Regression w/ Cross-Validation) using scikit-learn's RidgeCV() method. My data set has 5 categorical features and 2 numerical ones, so I started with LabelEncoder() to convert the categorical features to integers, and then I applied OneHotEncoder() to make several new feature columns of 0s and 1s, in order to apply my Machine Learning model. My X_train is now a numpy array, and after fitting the model I am getting its coefficients, so I'm wondering