Skip to main content

augmentation

Project description

Augmentation_Package

This packages utilizes two augmentation methods namely. They were taken from this paper: https://arxiv.org/abs/1910.04176

  1. Noise injection (aka radiation therapy): this simply upsamples a given list of embeddings with random noise.
  2. Delta_S: Which takes in a given array and extrapolates data given a target label.

How To Install?

!pip install autograde-aug==0.0.1

How do i use them?

First you need to import the library and instantiate it

from aug import Augmentation

ag = Augmentation.Augmentation()

Noise Injection:

l1, l2 = ag.add_noise(list_of_embeddings, list_of_labels)

l1 will be a new list with doubles the size including original embeddings + new embeddings l2 will be new list of labels

Chnage the level of noise you want to inject
l1, l2 = ag.add_noise(list_of_embeddings, list_of_labels, noise_low= 0.0, nose_high= 0.1)

Delta_S:

This stems from formula

X_hat =( Xi − Xj ) + Xk

Xi is random sample 1 Xj is random sample 2 Xk is random sample 3

Sample a pair of sentences (Xi, Xj) from the target category.

DELTAS applies deltas from the same target category to another sample Xk

 l1, l2 = ag.delta_S(list_of_embeddings, list_of_labels, target=0)

NEW !

This lambda with delta_s fusion is a novel technique that has not been tested yet or introduced yet.

if lambda_ is used then we use the lambda_ value times the delta

X_hat =( Xi − Xj ) * λ + Xk

 l1, l2 = ag.delta_S(list_of_embeddings, list_of_labels, target=0, lambda_= 0.3)

More Features will be added soon. Enjoy!

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

SpaceAugmentation-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

SpaceAugmentation-0.0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file SpaceAugmentation-0.0.2.tar.gz.

File metadata

  • Download URL: SpaceAugmentation-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for SpaceAugmentation-0.0.2.tar.gz
Algorithm Hash digest
SHA256 493e25f0f74441f7c1f66429e84f40b564d59b4135a6675c370ed14401f6dafd
MD5 ed351c439e534c7bb00a870f17ebe6f9
BLAKE2b-256 7a080cd00dfe35a62af165f289d022ce54bab46f5bcffafe463d36bf06885d3f

See more details on using hashes here.

File details

Details for the file SpaceAugmentation-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: SpaceAugmentation-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for SpaceAugmentation-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c874af0d5c2581811d5fc5bf03139b31fe63403f43a8f4b6822c7fc1f67bcd18
MD5 01510d16a7e30dceaf968e4507829d68
BLAKE2b-256 29d67e76c520546908a15c0104a73704cc3fdd9484ef21c58d8e6968973cd7f9

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