If I have a data matrix, how do I check if the categorical variables have been one-hot encoded or not? I need to use LIME to explain my prediction, and I read that LIME works only if you have category labels instead of one-hot encoded columns. I found code to convert it, but it works only if it has been encoded otherwise the columns get turned to NaNs.
So I need e piece of code that looks at a numpy array with data and tells me if it has been one hot encoded or not.