MIDASverse / MIDASpy

Python package for missing-data imputation with deep learning
Apache License 2.0
125 stars 35 forks source link

How to reverse One hot encoding #16

Closed khanwa closed 2 years ago

khanwa commented 2 years ago

Hello,

How to get the data in the original form (reverse dummies). We receive the imputed dataset in one hot encoded form. But how to convert it into the original dataset (the categorical data). Thank you

tsrobinson commented 2 years ago

Hi @khanwa,thanks for raising this issue!

I have now updated the example notebook to demonstrate how the imputed one hot data can be transformed back into categorical variables. I hope that helps, but do feel free to reopen this issue if not.

Tom