dist-keras
dist-keras copied to clipboard
Update transformers.py
Added support for 1D-List Features in OneHotEncodingTransformer
Hi,
Thanks for your contribution! Before merging, could you provide a usage example of this particular feature? Since it might impact performance to some extend.
Joeri
UseCase:
#PERFORM ONE-HOT-ENCODING ON FEATURES
transformer = OneHotTransformer(output_dim=nb_classes, input_col="features", output_col="features_1hot")
dataset_ = transformer.transform(dataset)
Where "features" is an list (1D array) of features. It outputs a 2D np.array of OHE features.