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.2.tar.gz (16.6 MB view details)

Uploaded Source

Built Distribution

oasis-0.1.2-py2.py3-none-any.whl (31.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: oasis-0.1.2.tar.gz
  • Upload date:
  • Size: 16.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for oasis-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c1171fa0f0e3abce2265cb3ee124d6ea7f14b33d9b4e437fda6a1297919e43d8
MD5 4e737f3b135a740536a7621161940f16
BLAKE2b-256 4ac8058ee582a272e5185fb9f18325bc0872224aa1cbf9c38b73907d410619e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oasis-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea721e29d5459c710a0a536a2484f426d8ac07afaadf1f889c7a433a9eb1585c
MD5 2e468773502e69f3355b1de092150272
BLAKE2b-256 2d95190ede33154be7038de16bb4f3244711ded661074c9ff67de11c85eafbdf

See more details on using hashes here.

Supported by

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