Aggregated Latent Space Index for Binary, Ordinal, and Continuous Data
Project description
alsi
Aggregated Latent Space Index for Binary, Ordinal, and Continuous Data
Python port of the R alsi package (CRAN, Kim 2026).
Overview
Multivariate data in behavioral and clinical research frequently exhibit dimensional multiplicity - association structure that distributes across several non-trivial dimensions rather than concentrating in one. The Aggregated Latent Space Index (ALSI) collapses this structure into a single, stability-validated person-level scalar via three automatic stages:
- Parallel analysis (Horn 1965) - how many dimensions exceed chance?
- Bootstrap Procrustes stability - dual criterion: principal angle < 20 deg AND Tucker phi >= 0.85
- Variance-weighted aggregation: alpha_i = sqrt(sum_k w_k * f_ik^2)
Three complete pipelines cover every common data type:
| Pipeline | Data type | Method | Index |
|---|---|---|---|
alsi_workflow() |
Binary (0/1) | Multiple Correspondence Analysis | ALSI (non-negative) |
alsi_workflow_ordinal() |
Likert / ordinal | ALS optimal scaling | Ordinal ALSI (signed) |
calsi_workflow() |
Continuous | Ipsatized SVD | cALSI (non-negative) |
Installation
pip install alsi
Requirements: Python >= 3.9, numpy >= 1.24, scipy >= 1.10
Quick start
Continuous data (cALSI)
from alsi import calsi_workflow, wawm4, WAWM4_DOMAINS
result = calsi_workflow(
wawm4,
B_pa=2000, B_boot=2000, q=0.95,
seed=20260206,
domains=WAWM4_DOMAINS,
)
print(result.summary())
Binary data (ALSI)
from alsi import alsi_workflow, ANR2, ANR2_VARS
result = alsi_workflow(
ANR2, vars=ANR2_VARS,
B_pa=2000, B_boot=2000,
seed=20260123,
)
print(result.summary())
Ordinal data (Ordinal ALSI)
from alsi import alsi_workflow_ordinal, BFI_Extraversion, BFI_ITEMS, BFI_REVERSED_ITEMS
result = alsi_workflow_ordinal(
BFI_Extraversion,
items=BFI_ITEMS,
reversed_items=BFI_REVERSED_ITEMS,
scale_min=1, scale_max=5,
n_permutations=100, B_boot=1000,
seed=12345,
)
print(result.summary())
Result fields (consistent across all three pipelines)
result.alphas # (n,) person-level ALSI values - the main output
result.F # (n, K*) person coordinates in the retained subspace
result.weights # (K*,) variance weights w_k = lambda_k / sum(lambda_j)
result.K_PA # dimensions retained by parallel analysis
result.K_star # dimensions passing dual stability criterion
result.stability # full bootstrap Procrustes diagnostics dict
result.summary() # formatted text summary
Lower-level functions
All lower-level functions from the R package are also available:
from alsi import (
mca_pa, # parallel analysis for MCA
mca_bootstrap, # bootstrap stability for MCA
mca_align, # Procrustes alignment for category coordinates
svd_pa, # parallel analysis for ipsatized SVD
svd_bootstrap, # bootstrap stability for SVD
svd_align, # Procrustes alignment for domain loadings
)
Built-in datasets
| Name | Shape | Pipeline | Description |
|---|---|---|---|
ANR2 |
1261 x 13 | Binary | Psychiatric diagnostic indicators + EDI/BMI outcomes |
BFI_Extraversion |
500 x 10 | Ordinal | Big Five Inventory Extraversion items (Likert 1-5) |
wawm4 |
900 x 9 | Continuous | WAIS-IV / WMS-IV cognitive domain scores |
from alsi import ANR2, ANR2_VARS # ANR2_VARS = the 9 binary columns
from alsi import BFI_Extraversion, BFI_ITEMS, BFI_REVERSED_ITEMS
from alsi import wawm4, WAWM4_DOMAINS
R package
CRAN: https://cran.r-project.org/package=alsi GitHub: https://github.com/sekangakim/alsi
Citation
Kim, S.-K. (2026). The Aggregated Latent Space Index: A stability-validated framework for person-level aggregation across binary, ordinal, and continuous data. Manuscript submitted for publication.
Kim, S.-K. (2026). alsi: Aggregated Latent Space Index (v0.1.0) [Python package]. PyPI. https://pypi.org/project/alsi/
License
GPL-3.0
Author
Se-Kang Kim, Ph.D. Psychology Division, Department of Pediatrics Baylor College of Medicine / Texas Children's Hospital ORCID: 0000-0003-0928-3396 se-kang.kim@bcm.edu
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alsi_kim-0.1.0.tar.gz.
File metadata
- Download URL: alsi_kim-0.1.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f75f2f1fca77ed4ed2c2d351414284fb002f5f85f80c0f3bcf3ec3c2eeb6c9c4
|
|
| MD5 |
6f9465ff1ca87c92938b655c75b0f5c6
|
|
| BLAKE2b-256 |
cc6bba0a01132508d510a09f1ad7a3d4577f6dcae34e2681b7d0b76ee5c4dbbf
|
File details
Details for the file alsi_kim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: alsi_kim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c93338ceb4ae6b3a7ecafe0e1f8d4326f2677397e6b4132434f25f6769d07bc
|
|
| MD5 |
35111ad241afc916ac06c33b1d4b13db
|
|
| BLAKE2b-256 |
891fd65a9ee32f657dccf310d5306caaeda98b710cf244b47d43107cd09eff73
|