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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file zeef-0.1.3.tar.gz.

File metadata

  • Download URL: zeef-0.1.3.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for zeef-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cc9aa957a4fd1ff7c8a5818b704d133a88b0945c82f9a4752468591204d86bc9
MD5 52b66ebbbe1f120c510babcc021719e4
BLAKE2b-256 0cd242077888301631bb3f50ddbd79dee43517620071a197df4d1192cf094798

See more details on using hashes here.

File details

Details for the file zeef-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: zeef-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for zeef-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3de3a10c1680214ca0fcfe67feab1bae661b9d8f06bad4c6312dcb7ceba10fc1
MD5 dfdc71ebf2a8b12eb9308246aa9f235d
BLAKE2b-256 23cd9a2b0207e4bdb99e3f5d4dd5f809387f389d16ca66d1e9d968c435c569fc

See more details on using hashes here.

Supported by

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