Convert embedding to gbm features

Hi, guys

I’m novice in DL and embeddings theory.

I want to use embeddings(from trained model) instead of one-hot-encoding in xgboost/lightgbm and etc

for example consider lesson6-rossmann.ipynb:

I’ve got weights of embedding of first categorical variable use code below:

emb_0 = to_np(learn.model.embeds[0]

emb_0.shape = (1116, 81) but the number of objects in train_df is 844338

and I want to convert ebm_0 to features matrix with size (844338, ?) for gbm model

Is it possible to make such thing? And how?

Hi there - did you find an answer to this problem of yours?