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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec6f4716b7f2aa5e45f6653ef09ec761c33142e964fce7f26ce8faed8a4e5615
|
|
| MD5 |
11ef31e0feba6bfc9f7e6d1e239e8c3e
|
|
| BLAKE2b-256 |
571151abd935c8705816285545f927848499bcd4c058712038bf6d10f921c32a
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecca700af776c628973a0e5e094cd0c069d0a7f4d36600c5f602122267ec3427
|
|
| MD5 |
c2d30e1e41938a07c3ced6b8132e8c6f
|
|
| BLAKE2b-256 |
d75fbfcfce5f829235082c3b9ee8a7ed62a572e046ac02f6942842482da8db1a
|