Skip to main content

data_transformation_tc is a Python library designed to streamline common data transformations required in machine learning and data science workflows, such as transpose a matrix, create time series windows, or apply 2D convolution

Project description

data_transformation_tc

Overview

data_transformation_tc is a Python library designed to streamline common data transformations required in machine learning and data science workflows, such as transpose a matrix, create time series windows, or apply 2D convolution.

Features

  1. Transpose: Quickly transpose any 2D matrix with the transpose2d function.
  2. Time Series Windowing: Generate windows for your 1D data arrays or lists with the window1d function. Customize window size, shift, and stride as per your needs.
  3. 2D Convolution: Apply 2D convolution on matrices using the convolution2d function. This function computes the cross-correlation of an input matrix with a specified kernel.

Installation

To install the data_transforms package, use pip:

pip install data-transformation-tc

Usage

A quick example to get you started:

from data_transformation_tc import transpose2d, window1d, convolution2d
import numpy as np
from typing import Union, List

# Transpose a matrix
matrix = [
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0]
]
transposed_matrix = transpose2d(matrix)
print(transposed_matrix)

# Create time series windows
input_data = np.array([0, 1, 2, 3, 4, 5, 6])
windows = window1d(input_data, size=3, shift=1, stride=2)
print(windows)

# Apply 2D convolution
input_matrix = np.array([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
])
kernel = np.array([
    [1, 0],
    [0, -1]
])
conv_result = convolution2d(input_matrix, kernel)
print(conv_result)

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

data-transformation-tc-0.1.7.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

data_transformation_tc-0.1.7-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file data-transformation-tc-0.1.7.tar.gz.

File metadata

  • Download URL: data-transformation-tc-0.1.7.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.12 Linux/6.2.0-34-generic

File hashes

Hashes for data-transformation-tc-0.1.7.tar.gz
Algorithm Hash digest
SHA256 a97e31399a3c130e7e85fcfd7458e0394261de065fb32133eea157714a39f192
MD5 15a3da26431b55c5c11ec123cd0ea203
BLAKE2b-256 9ef6cdd8d634a1c5502caa6eaeb19b3837cda9bbcbebe88d6100e1f446286e91

See more details on using hashes here.

File details

Details for the file data_transformation_tc-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for data_transformation_tc-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e523808ad8fbbc0a34158fee50ebe598562ec4a1b6a5ae82b2a15b73305d6eb4
MD5 e3258051723b16ff67b0c98cac3fd8b5
BLAKE2b-256 648268cb361fd27fc3154dbe5a679f279119ff69b2fc757a4b9ef70ac7d2566c

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