AxeldeRomblay / MLBox

MLBox is a powerful Automated Machine Learning python library.
https://mlbox.readthedocs.io/en/latest/
Other
1.49k stars 274 forks source link

How to assign back categorical variables to train and test data set after testing? #109

Closed nithinreddyy closed 3 years ago

nithinreddyy commented 3 years ago

Hey, MLBox is really good. But I'm unable to convert back or assign back categorical variables after testing to train and test data set. Can you please look into it.

AxeldeRomblay commented 3 years ago

Hello @nithinreddyy, what do you want to do ? I am not sure to understand your point. A feature is automatically converted/detected as categorical or numerical. If there is a mistake (which is very rare), you can try to cast your feature before running MLBox (eg : "2" -> "category2" so that it remains a string and can not be converted as a float)

nithinreddyy commented 3 years ago

Hello @nithinreddyy, what do you want to do ? I am not sure to understand your point. A feature is automatically converted/detected as categorical or numerical. If there is a mistake (which is very rare), you can try to cast your feature before running MLBox (eg : "2" -> "category2" so that it remains a string and can not be converted as a float)

That's not the question. The question is mlbox converts categories to numerical right, then after training and testing how to convert those numerical back to categorical? like in sklearn we have inverse_transform right