Discrepancy between revlog count in Optimize and Evaluate

If I click Optimize, Anki shows me a total of about 98k reviews. But if I click Evaluate, it shows me a total of about 122k reviews. What’s the reason for this discrepancy?

Damien recently said that the count shown there represents the total number of revlogs that match the search query before any filtering is applied. So, I don’t think that there should be any difference between these values if the search query is the same (the default one).

Please let me know the deck so I can try to reproduce it with your AnkiWeb collection.

I have sent you a private message.

Ok, thanks. It’s not a bug - when training, cards with atypical review histories (eg no learning steps) get excluded. This doesn’t happen when evaluating the parameters.

I thought the same initially. But then, I realized that

  • the count shown there represents the total number of revlogs that match the search query before any filtering is applied (which means that those revlogs should not be filtered at that stage)
  • I don’t have 24k reviews in cards with incomplete revlogs. To confirm this, I ran the following in Debug Console and copied the output to the search field in the Stats page. It shows only 416 reviews.
from aqt.utils import showText

sql = "SELECT cid FROM revlog AS r1 WHERE type = 1 AND id IN ( SELECT id FROM revlog AS r2 WHERE r1.cid = r2.cid ORDER BY id LIMIT 1 )"

cids = (str(cid) for cid in mw.col.db.list(sql))

search_query = f'"cid:{",".join(cids)}"'

showText(search_query, copyBtn=True)

I also have the same problem with the same deck from before, remember? When I click optimize using the same search query you gave me (-is:new -is:suspended) it uses about 11k of my reviews. But when I click Evaluate it uses about 90k and in turn gives me an extremely low RMSE value of 0.91%. There is something fuzzy about this and I believe this could also be remedied by the next update

I’m sorry, you’re right - evidently I did not read the code carefully enough yesterday. The same filtering is actually done for both steps - the discrepancy is due to the counts being after and before revlogs are associated with cards. I’ll adjust ‘evaluate’ so it matches ‘optimize’.