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.2.tar.gz (7.0 kB view details)

Uploaded Source

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

Hashes for suppsplit-0.0.2.tar.gz
Algorithm Hash digest
SHA256 70159262a062328fc39cc039f6d710f5595954a361c0d8a8951d0919fea3ec81
MD5 26d874e601db50c2896629130dddefc1
BLAKE2b-256 7b1ec1dda86201c6acefd5640d4d5969b8e24f69d8d09a33bcb803fee100bce2

See more details on using hashes here.

Provenance

The following attestation bundles were made for suppsplit-0.0.2.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