Skip to main content

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


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)

Uploaded Source

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

Hashes for suppsplit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d7c91422b0acc495c09957b481fae6f9ef959c81b0741bda44522b7078842d6b
MD5 21d22ef358aa5f38a28a5ef8f8a3ac91
BLAKE2b-256 0a22e037a055f60d073c37a19dca39767609ae1042acf70029bc399d3f87e319

See more details on using hashes here.

Provenance

The following attestation bundles were made for suppsplit-0.0.3.tar.gz:

Publisher: publish.yml on PanyiDong/SuppsPlit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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