A data splitting based on support points.
Project description
Python Wrapper for R package sPlit
sPlit: Split a Dataset for training and testing based on the idea of support points
Reference: Joseph, V. R., & Vakayil, A. (2022). SPlit: An optimal method for data splitting. Technometrics, 64(2), 166-176.
Installation
Open a command terminal.
git clone https://github.com/PanyiDong/SuppsPlit.git
cd SuppsPlit
python setup.py build_ext --inplace
Usage
import pandas as pd
import numpy as np
from SuppsPlit import SPlit
# toy dataset
df = pd.DataFrame({
"X": np.random.randn(100),
"Y": np.random.randn(100)
})
indices = SPlit(df, split_ratio=0.2, n_threads=2)
print("Test indices:", indices)
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
suppsplit-0.0.2.tar.gz
(7.0 kB
view details)
File details
Details for the file suppsplit-0.0.2.tar.gz.
File metadata
- Download URL: suppsplit-0.0.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70159262a062328fc39cc039f6d710f5595954a361c0d8a8951d0919fea3ec81
|
|
| MD5 |
26d874e601db50c2896629130dddefc1
|
|
| BLAKE2b-256 |
7b1ec1dda86201c6acefd5640d4d5969b8e24f69d8d09a33bcb803fee100bce2
|
Provenance
The following attestation bundles were made for suppsplit-0.0.2.tar.gz:
Publisher:
publish.yml on PanyiDong/SuppsPlit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
suppsplit-0.0.2.tar.gz -
Subject digest:
70159262a062328fc39cc039f6d710f5595954a361c0d8a8951d0919fea3ec81 - Sigstore transparency entry: 533499208
- Sigstore integration time:
-
Permalink:
PanyiDong/SuppsPlit@0afe75a6fe595dc5303fb0834472d7a5f9f6780b -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/PanyiDong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0afe75a6fe595dc5303fb0834472d7a5f9f6780b -
Trigger Event:
release
-
Statement type: