You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shocking: correspondence between vectors in the pickled matrix and corresponding articles for a particular source in the database is by index. This means that when we decided to look for the most relevant article in Fox News, we search for the closest vector in tfidf_<foxnews_source_id>.pkl. Suppose we get that vector 234 is the closest. Then we look up Article.objects.filter(source=Fox News).all()[234]. It would be better to have a list of article database id's pickled along with every matrix, so that we could find an id of a closest vector in O(1) and retrieve if from the database in O(1).
The text was updated successfully, but these errors were encountered:
Shocking: correspondence between vectors in the pickled matrix and corresponding articles for a particular source in the database is by index. This means that when we decided to look for the most relevant article in Fox News, we search for the closest vector in
tfidf_<foxnews_source_id>.pkl
. Suppose we get that vector 234 is the closest. Then we look upArticle.objects.filter(source=Fox News).all()[234]
. It would be better to have a list of article database id's pickled along with every matrix, so that we could find an id of a closest vector in O(1) and retrieve if from the database in O(1).The text was updated successfully, but these errors were encountered: