A library for fitting regression and gmm models in stratified subsamples with continuity constraints, quantile and lasso.
Project description
Stratified linear regression mixture models
Main classes
Joint2Regressor: Stratified multiple regression with continuity constraints for two (or K) groups.JointKRegressor: Stratified regression across K groups, with joint constraints, lasso and quantile.Joint2GMMRegressor: EM algorithm for stratified Gaussian mixture regression with constraints.JointUtils: Utilities for group splitting, closest point to median finding, etc.
Key Features
- Joint multi-group regression with continuity or custom constraints at the join point.
- Supports quantile regression, penalized regression (lasso, ridge, elasticnet), and stratified GMM.
- Stratified multivariate piecewise regression, not directly available in scikit-learn or statsmodels.
Note : This package is provided “as is” for reproducing results, even if not all features are fully
implemented or tested. For the moment the lasso and ridge includes the $beta_0$, hence the eventual
intercept may be removed (centering $y_\ell$). The code development had involved the use of modern
tools, for code refactoring into classes, writing of the docstring, and help for code cleaning and
debugging, robustfying the data entry types, etc.
Installation
pip install stratifreg
Usage
import stratifreg
from stratifreg import two_groups
References
- Priam, R. (2025). Family of linear regression mixture models stratified along the outcome.
Open Archive: hal-04179813v3
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 statifreg-0.1.1.tar.gz.
File metadata
- Download URL: statifreg-0.1.1.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6ee73e3c8e6785c8857a9e0df6f3985b5688e1e50671c4baeea3beb28b0f5cb
|
|
| MD5 |
7e9d47ef2e7dec58ca49b34806a78997
|
|
| BLAKE2b-256 |
89b125553c4a28f87c5af25c438837f3c2fae0a3e912daf526a44874fb701313
|
File details
Details for the file statifreg-0.1.1-py3-none-any.whl.
File metadata
- Download URL: statifreg-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a46ecd42929bd2f1391628210e721589969066af46f322c67361b6d19998c7d
|
|
| MD5 |
4213a09a628bb65b9a632a442bc7939b
|
|
| BLAKE2b-256 |
2a082918e031757682c1cc5cfad2c6ac97ae87cd388d165d1e804942b7dad75a
|