Skip to main content

No project description provided

Project description

niacin

A Python library for replacing the missing variation in your data.

PyPI version travis codecov readthedocs

Why should I use this?

Data collected for model training necessarily undersamples the likely variance in the input space. This library is a collection of tools for inserting typical kinds of perturbations to better approximate population variance; and, for creating similar-but-incorrect examples to aid in reducing the total size of the hypothesis space. These are commonly known as <small>ENRICHMENT</small> and <small>NEGATIVE SAMPLING</small>, respectively.

How do I use this?

Functions in niacin are separated into submodules for specific data types. Functions expose a similar API, with two input arguments: the data to be transformed, and the probability of applying a specific transformation.

enrichment:

data = "This is the song that never ends and it goes on and on my friends"
print(text.add_misspelling(data, p=1.0))
This is teh song tath never ends adn it goes on anbd on my firends

negative sampling:

data = "This is the song that never ends and it goes on and on my friends"
print(text.add_hypernyms(data, p=1.0))
This is the musical composition that never extremity and it exit on and on my person

How do I install this?

with pip:

pip install niacin

from source:

git clone git@github.com:deniederhut/niacin.git && cd niacin && python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
niacin-0.1.1-py3.6.egg (1.2 MB) Copy SHA256 hash SHA256 Egg 3.6
niacin-0.1.1-py3-none-any.whl (1.2 MB) Copy SHA256 hash SHA256 Wheel py3
niacin-0.1.1.tar.gz (1.2 MB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page