Skip to main content

Python program to label signal data

Project description

OKN LABEL PYTHON PACKAGE LIBRARY MANUAL

Python program to label the signal.csv and produce signal.updated.csv which contains label information such as is_chained_okn and num_chained_okn etc.

Installation requirements and guide

Anaconda

To install this program, Anaconda python distributing program and Anaconda Powershell Prompt are needed.
If you do not have Anaconda, please use the following links to download and install:
Download link: https://www.anaconda.com/products/distribution
Installation guide link: https://docs.anaconda.com/anaconda/install/

PIP install

To install oknlabel, you have to use Anaconda Powershell Prompt.
After that, you can use the oknlabel from any command prompt.
In Anaconda Powershell Prompt:

pip install oknlabel

Usage guide

Example usage

oknlabel -i (input csv file) -c (config file) -r (rule_info/rule_info_file) -o (output csv file)

Only -i flag is mandatory.
The rest -c, -r and -o are optional flags.

-c flag

To use the custom label config instead of built-in config which has information which and how we gonna add new columns into output csv file.
Example

oknlabel -i (input csv file) -c ./development/oknlabel_config.json

-r flag

To use the custom rules instead of default rules which are 2 min_okn_chain_length and 3 min_okn_per_window.
It can be string input or file input.
Example

oknlabel -i (input csv file) -r min_okn_chain_length:2,min_okn_per_window:3

(or)

oknlabel -i (input csv file) -r ./development/okn_detection_rule.json

-o flag

To change the default output directory location. The default directory will be the same level as input file and output file name will be signal.updated.csv.

Testing

If you want to test this program, you can clone this repository, install oknlabel and then open any command prompt or terminal.
In the terminal, go to ../oknlabel/development directory then run the following command:

oknlabel -i signal.csv

That will produce signal.updated.csv in that directory.

To upgrade version

In Anaconda Powershell Prompt,

pip install -U oknlabel

or

pip install --upgrade oknlabel

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

oknlabel-1.1.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

oknlabel-1.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file oknlabel-1.1.1.tar.gz.

File metadata

  • Download URL: oknlabel-1.1.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.7

File hashes

Hashes for oknlabel-1.1.1.tar.gz
Algorithm Hash digest
SHA256 a92f007daaa6f9fa08d8e1183349768afc4882269b81bf5ab72c9bc1763e2312
MD5 b51513db978468789cb9198a502856d0
BLAKE2b-256 cec7cb7e36c2ef2178aa0e868dfe119426ab8e8ef5542cfaec394a27ef41fe0f

See more details on using hashes here.

File details

Details for the file oknlabel-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: oknlabel-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.7

File hashes

Hashes for oknlabel-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2f0f18292ce864cfa0ec48a32119cf6844cb3fab909870c16ef281c8e6a420
MD5 9c14c2e6e853dc9cb47385d255e73ad4
BLAKE2b-256 32872fb2451eb256c74ab635ae84cf7a68603d7a5ae2357db547a4111566f498

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