Skip to main content

Optimal Asymptotic Sequential Importance Sampling

Project description

https://travis-ci.org/ngmarchant/oasis.svg?branch=master https://img.shields.io/badge/License-MIT-yellow.svg https://badge.fury.io/py/oasis.svg

OASIS is a tool for evaluating binary classifiers when ground truth class labels are not immediately available, but can be obtained at some cost (e.g. by asking humans). The tool takes an unlabelled test set as input and intelligently selects items to label so as to provide a precise estimate of the classifier’s performance, whilst minimising the amount of labelling required. The underlying strategy for selecting the items to label is based on a technique called adaptive importance sampling, which is optimised for the classifier performance measure of interest. Currently, OASIS supports estimation of the weighted F-measure, which includes the F1-score, precision and recall.

Example

See the Jupyter notebook under docs/tutorial/tutorial.ipynb:

>>> import oasis
>>> data = oasis.Data()
>>> data.read_h5('Amazon-GoogleProducts-test.h5')
>>> def oracle(idx):
>>>     return data.labels[idx]
>>> smplr = oasis.OASISSampler(alpha, data.preds, data.scores, oracle)
>>> smplr.sample_distinct(5000) #: query labels for 5000 distinct items
>>> print("Current estimate is {}.".format(smplr.estimate_[smplr.t_ - 1]))

License and disclaimer

The code is released under the MIT license. Please see the LICENSE file for details.

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

oasis-0.1.3.tar.gz (16.6 MB view details)

Uploaded Source

Built Distribution

oasis-0.1.3-py2.py3-none-any.whl (25.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: oasis-0.1.3.tar.gz
  • Upload date:
  • Size: 16.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.7

File hashes

Hashes for oasis-0.1.3.tar.gz
Algorithm Hash digest
SHA256 314fa9b1e092ff9a400790f2936ff92dba97c442fdaefaed87375e48544d238d
MD5 15d5ef14ea816586ebc4a561aa7a1960
BLAKE2b-256 2a9d50a2c2d35cab948a660874a04e2068f0ebeb539b86bbc8464c8f537001b3

See more details on using hashes here.

File details

Details for the file oasis-0.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: oasis-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.7

File hashes

Hashes for oasis-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2cbd36b940de19a515512187c245621efc2063d33076e3a293f8cecb28b7d351
MD5 2d7225e7b52ceef0a091a2fe4018f5b6
BLAKE2b-256 143f4a1a0241c0a937a222b5b96729ba22f0fbc78f1ac1b3b218b084bcd4930c

See more details on using hashes here.

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