Skip to main content

A Train Test Val Split library

Project description

ttsvsplit - Train, Test, Validation Splitter

A simple utility designed to seamlessly split datasets into train, test, and validation sets, inspired by sklearn's train_test_split.

Installation

To install ttvsplit, use pip:

pip install ttsvsplit

Usage

Using ttvsplit is straightforward. Import the train_test_val_split function and apply it on your features (X) and labels (y).

Here's a basic example:

import numpy as np
from ttsvsplit import train_test_val_split

# Sample data
X = np.array([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]])
y = np.array([1, 0, 1, 0, 1, 0])

X_train, y_train, X_test, y_test, X_val, y_val = train_test_val_split(X, y)

Functions

The library provides the following function:

  • train_test_val_split(X, y, train_size=0.6, test_size=0.2, random_state=None):
    • X: Features to be split.
    • y: Labels corresponding to the features.
    • train_size: Proportion of the data to be used as training data (default: 0.6).
    • test_size: Proportion of the data to be used as testing data (default: 0.2).
    • random_state: Seed for reproducibility.

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

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

pyProcessAutom-0.2.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

pyProcessAutom-0.2-py3-none-any.whl (1.7 kB view details)

Uploaded Python 3

File details

Details for the file pyProcessAutom-0.2.tar.gz.

File metadata

  • Download URL: pyProcessAutom-0.2.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for pyProcessAutom-0.2.tar.gz
Algorithm Hash digest
SHA256 ec6f4716b7f2aa5e45f6653ef09ec761c33142e964fce7f26ce8faed8a4e5615
MD5 11ef31e0feba6bfc9f7e6d1e239e8c3e
BLAKE2b-256 571151abd935c8705816285545f927848499bcd4c058712038bf6d10f921c32a

See more details on using hashes here.

File details

Details for the file pyProcessAutom-0.2-py3-none-any.whl.

File metadata

  • Download URL: pyProcessAutom-0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for pyProcessAutom-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ecca700af776c628973a0e5e094cd0c069d0a7f4d36600c5f602122267ec3427
MD5 c2d30e1e41938a07c3ced6b8132e8c6f
BLAKE2b-256 d75fbfcfce5f829235082c3b9ee8a7ed62a572e046ac02f6942842482da8db1a

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