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.3.tar.gz
(7.1 kB
view details)
File details
Details for the file suppsplit-0.0.3.tar.gz.
File metadata
- Download URL: suppsplit-0.0.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c91422b0acc495c09957b481fae6f9ef959c81b0741bda44522b7078842d6b
|
|
| MD5 |
21d22ef358aa5f38a28a5ef8f8a3ac91
|
|
| BLAKE2b-256 |
0a22e037a055f60d073c37a19dca39767609ae1042acf70029bc399d3f87e319
|
Provenance
The following attestation bundles were made for suppsplit-0.0.3.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.3.tar.gz -
Subject digest:
d7c91422b0acc495c09957b481fae6f9ef959c81b0741bda44522b7078842d6b - Sigstore transparency entry: 533513941
- Sigstore integration time:
-
Permalink:
PanyiDong/SuppsPlit@6641bca98fdb44fdbff7b11d00d76e897aa605f4 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/PanyiDong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6641bca98fdb44fdbff7b11d00d76e897aa605f4 -
Trigger Event:
release
-
Statement type: