modAL-python / modAL

A modular active learning framework for Python
https://modAL-python.github.io/
MIT License
2.19k stars 323 forks source link

Creation of Query by Committee #88

Open hwimalar opened 4 years ago

hwimalar commented 4 years ago

Hi, How do I ensure that the committee has a competing hypothesis? I was checking the models and all the models in the committee have the same hyper-parameters. Where does this concept of competing hypothesis come from? Also is it possible to create a committee with different algorithms like SVM, RF, and xgboost?

cosmic-cortex commented 4 years ago

Hi! To use the Committee, you have to provide a list of active learners explicitly, for example:

from modAL.models import Committee
from modAL.disagreement import vote_entropy_sampling

# a list of ActiveLearners:
learners = [learner_1, learner_2]

committee = Committee(
    learner_list=learners,
    query_strategy=vote_entropy_sampling
)

To get a competing hypothesis, you should train them accordingly, for instance using bootstrapping and bagging.

You can use it with different algorithms, as long as their implementation uses the scikit-learn API.