Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not find pre-trained feature_embedding files #2

Open
Setftzoesto opened this issue Mar 31, 2024 · 10 comments
Open

Do not find pre-trained feature_embedding files #2

Setftzoesto opened this issue Mar 31, 2024 · 10 comments

Comments

@Setftzoesto
Copy link

I have run the main codes with parameters in the example you've given in readme.
But I can not run the code in the image,
bug

it prompts me that do not find 'Electronics_paraphrase-distilroberta-base-v1.npy'.
It seems like I need to use the pre-train models to get feature_embedding?

@shuyuan-x
Copy link
Collaborator

Yes, you need to use the the pre-trained sentence embedding models to get feature_embedding. We applied the pre-trained paraphrase-distilroberta-base-v1 sentence embedding model in a public transformer implementation: https://github.com/UKPLab/sentence-transformers

@Setftzoesto
Copy link
Author

OK, thank you very much!

@Setftzoesto
Copy link
Author

My apology for disturbing.
I have read the experiment implementation details of this paper, which mentioned that (for the Amazon dataset as an example): The final feature_embedding is the average of embedding of the 'title', 'description', and 'feature'.
I have a question about that: Is it pre_train model would finish the average job? Or I should compute the average manually?

@Setftzoesto
Copy link
Author

Mr.Xu, apology again. Would it be possible for you to share the source code of computing feature_embedding used in your research?
I am very new to this area and try to study further. I try to program the codes but I am not sure if it's the correct method for getting feature_embedding. That would be a very great help if you want to share.

@shuyuan-x
Copy link
Collaborator

The feature_embedding is the average of embedding of the 'title', 'description' and 'feature'. I used pre-trained model to encode sentences separately and manually compute the average.

@Setftzoesto
Copy link
Author

Setftzoesto commented Apr 4, 2024

That's nice. I have achieved the function.
But there is a new problem that I need to compute IPS_EXPO_PROB.😂
大佬,能给一份代码吗,嘤嘤嘤

@shuyuan-x
Copy link
Collaborator

It does not need special code. We first train a IPSBiasedMF model, and then save the predicted user-item matrix as the exposure probability into IPS_EXPO_PROB file. I have updated the README to provide more details.

@Setftzoesto
Copy link
Author

Setftzoesto commented Apr 4, 2024

OK, thank you very much!
Oh my god, I just have found the IPSBiasedMF model in the project!😂

@shuyuan-x
Copy link
Collaborator

The propensity score is calculated based on the method introduced in "Unbiased recommender learning from missing-not-at-random implicit feedback". Or you can refer the equation 18 in our paper. After calculating the propensity score, save the score in propensity.npy file. Use the calculated score to train a IPSBiasedMF model.

@Setftzoesto
Copy link
Author

Setftzoesto commented Apr 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants