davefernig / alp

active learning in python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alp: active learning in python

This is a python implementation of some popular active learning techniques, including uncertainty sampling and query-by-committee. It is built on top of numpy, scipy, and sklearn. I wrote this for my own learning purposes; it is not particularly efficient.

Example

from active_learning.active_learning import ActiveLearner
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import make_classification

X, X_unlabeled, y, y_oracle = train_test_split(*make_classification())
clf = LogisticRegression().fit(X, y)

AL = ActiveLearner(strategy='entropy')
AL.rank(clf, X_unlabeled, num_queries=5)

I did this while working through Burr Settles' excellent literature survey. If you're interested in this topic you should read it.

About

active learning in python

License:MIT License


Languages

Language:Python 100.0%