Skip to main content

No project description provided

Project description

Data Transformation Library

Overview

This Python library is designed to assist data scientists in performing essential data transformations, particularly for machine learning models. It provides a suite of functions that simplify common operations in data processing and analysis.

Features

The library currently offers three primary functions:

  • Transpose: A function to transpose matrices (2D tensors), switching their axes.
  • Time Series Windowing: A tool for creating windows in time series data, essential for time series analysis and modeling.
  • Cross-Correlation: An implementation of the cross-correlation function, commonly used in convolutional
  • neural networks.

Transpose

transpose.png

  • Function: transpose2d(input_matrix)
  • Input: input_matrix - a list of lists of real numbers representing a 2D matrix.
  • Output: Transposed matrix as a list of lists of real numbers.
  • Implementation: Pure Python, using standard library.

Time Series Windowing

window.png

  • Function: window1d(input_array, size, shift=1, stride=1)
  • Inputs:
    • input_array: List or 1D Numpy array of real numbers.
    • size: Integer, size (length) of the window.
    • shift: Integer, shift (step size) between windows.
    • stride: Integer, stride (step size) within each window.
  • Output: List of lists or 1D Numpy arrays of real numbers.
  • Implementation: Python and Numpy.

Cross-Correlation

convolution.png

  • Function: convolution2d(input_matrix, kernel, stride=1)
  • Inputs:
    • input_matrix: 2D Numpy array of real numbers.
    • kernel: 2D Numpy array of real numbers.
    • stride: Integer, stride value.
  • Output: 2D Numpy array of real numbers.
  • Implementation: Python and Numpy.

Installation

The library is available on PyPI and can be installed using pip:

pip install turing_data_transformation_library

Usage

After installation, the functions can be imported and used in Python scripts or Jupyter notebooks.

Example usage:

from turing_data_transformation_library.transpose import transpose2d
from turing_data_transformation_library.time_series_windowing import window1d
from turing_data_transformation_library.cross_correlation import convolution2d

# Example for transpose2d
matrix = [[1, 2], [3, 4]]
transpose2d(matrix)

# Example for window1d
input_array = [1, 2, 3, 4, 5]
size = 2
shift = 2
window1d(input_array, size, shift)

# Example for convolution2d
input_matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
kernel = [[1, 0], [0, -1]]
stride = 2
convolution2d(input_matrix, kernel, stride)

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

turing_data_transformation_library-0.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file turing_data_transformation_library-0.1.3.tar.gz.

File metadata

File hashes

Hashes for turing_data_transformation_library-0.1.3.tar.gz
Algorithm Hash digest
SHA256 07eb08c2dbaf3b2682466d6c4c4ce7e44bfb168e9f0766bfc0933a9e6de9016c
MD5 2471a98df52e11d1c60ac63f37d4dc13
BLAKE2b-256 a37998e460f3b014f149c9e20283f6deec7406810392ede6a92559cb6130faef

See more details on using hashes here.

File details

Details for the file turing_data_transformation_library-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for turing_data_transformation_library-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0c10bb08e4bf2661858cbc7b30969a59f7ba5229e7f51da911e810283639671b
MD5 eea2d9528292df273be74e83fdeacff9
BLAKE2b-256 1320c0ec2771b068900168b856ab2a5c017b9437ff16677155480c459db482db

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