0

What is the tf.keras equivalent of encoder.get_feature_names found in sklearn? As shown shown in this SO question Need this to get all the one-hot encoded feature names created "from tensorflow.keras.layers.experimental import preprocessing". I will appreciate any post with example.

opalbert
  • 59
  • 4
  • Can you add the name of the layer you are using? `preprocessing` is a module. – Lescurel Feb 11 '21 at 08:16
  • I am using preprocessing.CategoryEncoding to encode string or numeric categorical features into one-hot. I hope that helps. – opalbert Feb 11 '21 at 11:11
  • CategoryEncoding doesn't even take strings as input – Nicolas Gervais Feb 11 '21 at 14:13
  • @NicolasGervais `preprocessing.StringLookup` to target string features and then use CategoryEncoding for the encoding. My question was, is there a way to get the feature names of all the new features created after encoding? Sklearn provides **encoder.get_feature_names**, does tf.keras has something like that? – opalbert Feb 11 '21 at 15:17

0 Answers0