how to create embeddings for genres if one hot encoding is used for genres on MovieLens100K dataset instead of label encoder
Hi @Vishnu, You can use the embedding layer to create a embeddings for the one_hot_encoded data. For example:
from tensorflow.keras.layers import Embedding
embedding_dim = 4
num_categories = X_onehot.shape[1]
embedding_layer = Embedding(input_dim=num_categories, output_dim=embedding_dim, input_length=1)
embedded_data = embedding_layer(X_onehot).numpy()
print("Embedded Data:\n", embedded_data)
please refer to this gist for complete code example. Thank You.