Thanks for this great library, i'm trying to pass my lightfm training model a pre-trained item embedding matrix (learned from word2vec) in the following way:
pre_trained_item_embedding_matrix = np.ndarray((n_items, num_features)).astype(np.float16)
for index, vector in pre_trained_embeddings:
for feature in vector:
pre_trained_item_embedding_matrix[index][feature] = vector[feature]
pre_trained_item_embedding_matrix = sparse.csr_matrix(pre_trained_item_embedding_matrix, dtype=np.float16)
model = LightFM(loss='warp', no_components=number_of_latent_features)
model.fit(interactions, epochs=10, item_features=pre_trained_item_embedding_matrix)
the model seems to finish training without any issue, but when i'm trying to get item embeddings from the lightfm model, i get an item embeddings matrix in completely wrong shape (i.e. number_of_pretrained_features, number_of_latent_features)
Thanks for this great library, i'm trying to pass my lightfm training model a pre-trained item embedding matrix (learned from word2vec) in the following way:
the model seems to finish training without any issue, but when i'm trying to get item embeddings from the lightfm model, i get an item embeddings matrix in completely wrong shape
(i.e. number_of_pretrained_features, number_of_latent_features)
ami i passing the pretrained embedding matrix to lightfm model as item_featurs wrong ? Thanks in advance.