I'm trying to build autoencoder in keras in order to detect anomalies. However, most of the data is categorical and I have to encode it. When it comes to production, categorical features can take new values. So I thought of using entity embedding.

I've created an embedding layer for each categorical feature. In the code below, I concatenate all together and I add other Dense layers:

output = Concatenate()(output_embeddings)

encoder = Dense(20, activation="relu", activity_regularizer=regularizers.l1(10e-5))(output)

encoder= Dense(nbr_feautres, activation='relu')(encoder)

decoder = Dense( ???? )(encoder)

model = Model(inputs=input_models, outputs=decoder)

Is it possible to add a decoder layer and how can I implement this? Thanks.

  • $\begingroup$ Hi. I am struggling with this. Did you get a solution? $\endgroup$ – Namrata Tolani Apr 8 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.