ntucllab / libact

Pool-based active learning in Python
http://libact.readthedocs.org/
BSD 2-Clause "Simplified" License
776 stars 174 forks source link

About ALBL raising "Out of query budget" #128

Open MrLevo520 opened 6 years ago

MrLevo520 commented 6 years ago

Hi~ I find something wrong when i run ALBL algorithm ,i chose 1000 unlabeled data to label, but it raised "Out of query budget",i check the code about active_learning_by_learning.py file, line 225 and 242 confuse me, is that correct? In my opinion, “raise ValueError("Out of query budget")” in line 242 will always raise the error ,and in line 225, it return NOTHING? That's may confuse someone just like me , it will be helpful if you explain the ERROR,thanks

yangarbiter commented 6 years ago

I think that on line 225 I want to raise error when dataset.get_unlabeled_entries() returns an empty list which indicates there is no unlabeled entry left.

In usual case, the make_query method will return at line 238. If it run out of budget, it will break out of the while loop and have the error in line 242.

The word query budget in ALBL is actually a little confusing. The problem is that in the original ALBL describe in its paper, ALBL actually could make query to the instances that have been queried before. So when that happens, in our implementation, it will go to line 240 instead of exiting at line 238 and rerun the while loop. When you set query budget to 1000, it will actually only able query less than 1000 instances. I would suggest you set the budget a little higher.