Skip to main content

A Python Framework for Deep Active Learning

Project description

Zeef: Interactive Learning for Python

PyPI Downloads Testing FOSSA Status

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

Apache License 2.0

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)

Uploaded Source

Built Distribution

zeef-0.1.3-py3-none-any.whl (28.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page