Skip to main content

Segment Profile Extraction via Pattern Analysis

Project description

sepa

Segment Profile Extraction via Pattern Analysis

Python port of the R SEPA package (CRAN, Kim 2026).

PyPI License: MIT Tests CRAN


Overview

SEPA implements SVD-based row-isometric biplot analysis for multivariate profile data. After ipsatization (row-mean centering), SEPA provides:

  • Plane-fit rho and direction cosines for every person × domain pair
  • BCa bootstrap CIs for domain loading coordinates
  • Percentile bootstrap CIs for per-person cosines
  • Parallel analysis for dimensionality selection

Reference: Kim & Grochowalski (2019) doi:10.1007/s00357-018-9277-7


Installation

pip install sepa

Requirements: Python >= 3.9, numpy >= 1.24, scipy >= 1.10


Quick start

from sepa import run_sepa, fake_wj, SEPA_DOMAINS

# Full pipeline on the built-in WJ-IV look-alike dataset (n=5127)
res = run_sepa(
    fake_wj,
    K=4,
    domain_names=SEPA_DOMAINS,
    target_ids=[724, 944],   # persons for per-person cosine CIs
    B_dom=2000, B_cos=2000,
    pa_B=2000, seed=1,
)

print(res["pa"]["sig_dims"])           # significant dimensions
print(res["sepa_stats"]["rho"].head()) # plane-fit rho
print(res["dom_coords"])               # domain coords with BCa CIs
print(res["cosine_tables"][724])       # person 724 cosine table

Lower-level functions

from sepa import (
    parallel_analysis_ipsatized,  # PA for ipsatized data
    sepa_stats_all,               # rho + direction cosines
    percentile_ci_mat,            # percentile CIs from bootstrap matrix
    boot_cis_all,                 # BCa CIs for all statistics
)

Built-in dataset

fake_wj is a 5127 x 8 synthetic WJ-IV look-alike dataset (ID + 7 domains): LT, ST, CP, AP, VP, CK, FR — all in standard score metric (mean100, SD15).

from sepa import fake_wj, load_fake_wj, SEPA_DOMAINS
df = load_fake_wj()   # pandas DataFrame version

R package

CRAN: https://cran.r-project.org/package=SEPA GitHub: https://github.com/sekangakim/SEPA


Citation

Kim, S.-K., & Grochowalski, J. H. (2019). Segment Profile Extraction via Pattern Analysis. doi:10.1007/s00357-018-9277-7


License

MIT

Author

Se-Kang Kim, Ph.D. Baylor College of Medicine / Texas Children's Hospital se-kang.kim@bcm.edu

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

sepa_kim-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sepa_kim-0.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file sepa_kim-0.1.0.tar.gz.

File metadata

  • Download URL: sepa_kim-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for sepa_kim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c4c0c74f09fb9e542d982126bbe2bae1c7fb97beedd03df0337908256c308d0
MD5 4567b66b030d92cd3b7bf5e0f02b2ad7
BLAKE2b-256 3571c203a1fd10fb4892035f4fa4b1868cf1e490d5cccef5fe112bfc9f37ae89

See more details on using hashes here.

File details

Details for the file sepa_kim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sepa_kim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for sepa_kim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e55091e1e520b3e89a9fd2ad14de4bd81179051bb5e395543f920ed2de3570e5
MD5 73c0c23e06a17da3101fe13191b5cc9b
BLAKE2b-256 ccbe004ca70293637718a1a38f29e957c44db44b19faad7a33afe9ec5a1a041e

See more details on using hashes here.

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