PYRSM
Python functions and classes for Business Analytics at the Rady School of Management (RSM), University of California, San Diego (UCSD).
Features
Basics Module - Statistical tests and analyses:
compare_means- Compare means across groups (t-tests, ANOVA)compare_props- Compare proportions between groupscorrelation- Correlation analysis with significance testscross_tabs- Cross-tabulation with chi-square testsgoodness- Goodness of fit testssingle_mean- Single sample mean testssingle_prop- Single sample proportion testsprob_calc- Probability calculator for common distributions
Model Module - Regression and machine learning:
regress- Linear regression with statsmodelslogistic- Logistic regression with statsmodelsmlp- Multi-layer perceptron (neural network) with sklearnrforest- Random forest with sklearnxgboost- XGBoost gradient boosting
EDA Module - Exploratory data analysis:
explore- Data exploration and summary statisticspivot- Pivot tablesvisualize- Data visualization
All modules use Polars DataFrames and plotnine for visualization.
Installation
Requires Python 3.12+ and UV:
mkdir ~/project
cd ~/project
uv init .
uv venv --python 3.13
source .venv/bin/activate
uv add pyrsm
For machine learning models, install with extras:
uv add "pyrsm[ml]"
For all features:
uv add "pyrsm[all]"
Quick Start
import polars as pl
from pyrsm import basics, model
# Load data
df = pl.read_parquet("data.parquet")
# Statistical test
cm = basics.compare_means(df, var="price", byvar="category")
cm.summary()
cm.plot()
# Regression model
reg = model.regress(df, rvar="price", evar=["size", "age", "type"])
reg.summary()
reg.plot()
Examples
Extensive example notebooks are available at: https://github.com/radiant-ai-hub/pyrsm/tree/main/examples
License
This project is licensed under the GNU Affero General Public License v3.0.
Release files for pyrsm 2.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyrsm-2.4.1.tar.gz | 189.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrsm-2.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 356.4 kB
Release files / pyrsm-2.4.1.tar.gz
| Download URL | pyrsm-2.4.1.tar.gz |
|---|---|
| Size | 189.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3d8741f20b00288744c7158e3fce5f39771550fab86f7b91f5bb0ea341470ac
|
|
BLAKE2b-256 checksum How to use checksums |
43761c96d7be81433a35495ecad1b2a66f10a260161a9dddee2daf57824ab168
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / pyrsm-2.4.1-py3-none-any.whl
| Download URL | pyrsm-2.4.1-py3-none-any.whl |
|---|---|
| Size | 167.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b0045ac07d283fb8ea04f1248253127c0fd126526eabbd9bfaa8740d0f2d6ab
|
|
BLAKE2b-256 checksum How to use checksums |
a4379eabba911f456ff594f9fbc60c18604eeba65121719de894cac09c3653a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|