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
- 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
- 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
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for turing_data_transformation_library-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f27e3898f45590c5df18b9352866c8579c12970eeb0c517f71d33d359acce559 |
|
MD5 | beded51e76a9bcd81853ca47436981ab |
|
BLAKE2b-256 | 889809b679bdbaf718d46b0b42efdc51c905dbc153909f1e97e73513bb62f702 |
Close
Hashes for turing_data_transformation_library-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be0bdffdb2a76046d84ce01fdd10c693503ca31848ea6927711cc6f849356948 |
|
MD5 | 1deadfb24ed610960c2bf8095635e5ab |
|
BLAKE2b-256 | 2f99d35db53a5ba06e97f4f223b0cebb2d2a5f6e2bbd8824eae8de3a2dbc0339 |