Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

sklearn.preprocessing.OneHotEncoder and the way to read it

$
0
0

I have been using one-hot encoding for a while now in all pre-processing data pipelines that I have had.

But I have run into an issue now that I am trying to pre-process new data automatically with flask server running a model.

TLDR of what I am trying to do is to search new data for a specific Date, region and type and run a .predict on it.

The problem arises as after I search for a specific data point I have to change the columns from objects to the one-hot encoded ones.

My question is, how do I know which column is for which category inside a feature? As I have around 240 columns after one hot encoding.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>