Skip to main content

A sample library of Data Transformation functions.

Project description

Data Transformation Library

About

This project is an exercise primarily focused on building Python libraries, publishing packages to PyPI and dependency management using Poetry.

The task is to implement three data transformation functions:

  • Transpose - flipping of the input matrix diagonally, meaning that the row and column indices of a matrix are switched and a new matrix is produced.
  • Time Series Windowing - producing lists or numpy arrays containing a subset of elements of the input list or numpy array. The size of the window is defined by passing size, stride and shift parameters. Time series windowing is used for making informed decisions in economics, climate, epidemiology and many other fields.
  • Cross-Correlation (Convolution) - used in convolutional neural networks in machine learning libraries. Cross-correlation and convolution are both operations applied to images. Cross-correlation means sliding a kernel (filter) across an image. Convolution means sliding a flipped kernel across an image. In practice using one over the other does not change the result, just the resulting values are learned in a flipped orientation. 2D Convolutions are essential in the advancement of convolutional neural networks and various image processing filters such as blurring, sharpening, edge detection, and others.

Functions were built using Python and Numpy (as per requirements of this task). Having the knowledge of how to build such functions by yourself provides the flexibility in ones specific uses cases, as some times the already built functions in various libraries (PyTorch, cv2, etc.) have constraints and changing them can be difficult or even impossible and impractical.

For package management we were required to use Poetry.

Libraries Used

For this project only Python's standard library as well as Numpy (were it was required) were used.

For package management Poetry was used.

How to Use

As this project is an exercise on building Python libraries, the built library can be installed from PyPI, were it is being published.

To do so in the terminal window type pip install dtl_functions_rd.

To quickly test this library, download the library files from https://pypi.org/project/dtl-functions-rd/. Open the .tar file with WinRAR or similar document extraction program and copy main.py file that is located in the main project directory in the examples folder src/examples/ to your project and run the file to see a few examples and outputs of the functions of this data transformation library.

Possible Future Improvements

  • Version handling

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

dtl_functions_rd-0.1.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

dtl_functions_rd-0.1.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dtl_functions_rd-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dtl_functions_rd-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5a1b9f43052b77bf25b8e51c6006eb901bb1fae2e5c7a288497b0b3f6a68f62b
MD5 ced73c2b731a53c70ca0d4ccd75a1aaf
BLAKE2b-256 00e10b7f0674b0324cedb352d0d94bb8dfaf74bd9891fb1fefce99967928d7ed

See more details on using hashes here.

File details

Details for the file dtl_functions_rd-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dtl_functions_rd-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6a08657c956c3b9b512bca7d636bcdd13c9102e3033b890072e425d872eab6
MD5 37047af8e6dbf97e876b56c818ba40a6
BLAKE2b-256 ce535978fbb233ff2eec302d14d4e629b66a90009fd221e9fcf6151740fd5f3c

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