r/MachineLearning • • Sep 12 '20

Project [P] codequestion: Ask coding questions directly from the terminal

657 Upvotes

45 comments sorted by

View all comments

2

u/thntk Sep 13 '20

Cool project! The MRR metrics are surprisingly high to me. I have tried very similar approach on different datasets (~104 documents), but never got that high results, and full-text search gave better results for me most of the time. Do you know why it works well here? I guess the queries and data must have some properties that favor this method. Would you mind explaining how you prepared the queries and evaluation data? I'm just curious.

2

u/davidmezzetti Sep 13 '20

Funny you mention that. I spent over two weeks trying to beat this method with a transformers model and was unable to.

https://github.com/neuml/codequestion/issues/8

The weighting of the tag tokens really help build a good embeddings object.

In terms of the evaluation data, I took 100 queries and manually ran them through google for stack exchange sites, and took the database id of the top result.

2

u/thntk Sep 13 '20

Thanks for the information. Interesting. I also used FastText, but weighted with TF-IDF instead of BM25, but in the end never got a satisfying result. I can see that the tags play a significant role in this dataset.

How many principle components did you remove? Does the number of principle components cause a big difference?

2

u/davidmezzetti Sep 13 '20

I tested 0, 2 and 3. It didn't make a huge difference but 3 worked best.