A Python Framework for Deep Active Learning
Project description
Zeef: Interactive Learning for Python
An interactive learning framework for data-centric AI.
Zeef is featured for
- Active learning - Off the shelf data selection algorithms to reduce the labor of data annotation.
- Continual learning - Easy to use APIs to prototype a continual learning workflow instantly.
Installation
pip install zeef
For the local development, you can install from the Anaconda environment by
conda env create -f environment.yml
Quick Start
We can start from the easiest example: random select data points from an unlabeled data pool.
from sklearn import svm
from zeef.data import Pool
from zeef.learner.sklearn import Learner
from zeef.strategy import RandomSampling
data_pool = Pool(unlabeled_data) # generate the data pool.
# define the sampling strategy and the SVM learner.
strategy = RandomSampling(data_pool, learner=Learner(net=svm.SVC(probability=True)))
query_ids = strategy.query(1000) # query 1k samples for labeling.
data_pool.label_by_ids(query_ids, data_labels) # label the 1k samples.
strategy.learn() # train the model using all the labeled data.
strategy.infer(test_data) # evaluate the model.
A quick MNIST CNN example can be found in here. Run
python torch_al.py
to start the quick demonstration.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zeef-0.1.3.tar.gz
(21.8 kB
view hashes)
Built Distribution
zeef-0.1.3-py3-none-any.whl
(28.8 kB
view hashes)