Python package used in the MSBA program the Rady School of Management @ UCSD
Project description
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.
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 pyrsm-2.3.0.tar.gz.
File metadata
- Download URL: pyrsm-2.3.0.tar.gz
- Upload date:
- Size: 170.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
827834de1bddbba89bbf25a1edefa2393ad134f9d1c5e5f52e54cbfe7b5a729a
|
|
| MD5 |
7e4798b43f46d5000a7d344172811700
|
|
| BLAKE2b-256 |
8271cccb3bf7d0fa609596b555d5d508f70328ab74a7574bf6d749f46a26ee05
|
File details
Details for the file pyrsm-2.3.0-py3-none-any.whl.
File metadata
- Download URL: pyrsm-2.3.0-py3-none-any.whl
- Upload date:
- Size: 149.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa5619af20cfd6762992166ef9bf7a136ad8d0f326a5410e7ea0d037a58e0366
|
|
| MD5 |
a175141e254413ae69d294755b00653f
|
|
| BLAKE2b-256 |
da20bacb23d0ade0c2d5ab2d54c14c0543f2ab2d96548385ecab59b785a2c1ff
|