17zuoye / pyirt

A python library of IRT algorithm
MIT License
99 stars 54 forks source link

KeyError fix in localDAO #15

Closed bybunni closed 5 years ago

bybunni commented 5 years ago

I believe this fixes Issue 13 which I also ran into. The KeyError exception is not caught in localDAO get_map when item_idx does not exist for a given ans_key. This can happen when no users provided ans_key for item_idx. There was a previous comment to return an empty list in these cases which I have done and this resolves the error for me and provides sensible results. This is not caught in the localDAO test as the test data contains only a single question id.

junchenfeng commented 5 years ago

Thanks, @bybunni. I think you are right.

I am planning to do a major refactor of pyirt in 2019Q1. Would you like to be part of it?