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]"
If you cloned pyrsm and was to add it in editable format use:
uv add --editable --dev /home/vnijs/gh/pyrsm`
To add to a specific (project) folder use:
uv add --project /opt/base-uv pyrsm`
Quick Start
import polars as pl
import pyrsm as rsmi
# Load data
df = pl.read_parquet("data.parquet")
# Statistical test
cm = rsm.basics.compare_means(df, var="price", byvar="category")
cm.summary()
cm.plot()
# Regression model
reg = rsm.model.regress(df, rvar="price", evar=["size", "age", "type"])
reg.summary()
reg.plot()
R data files to parquet
Convert R data files (.rds, .rda) to parquet files that load into Radiant-AI. Factors become
Enums with R's level order, and the markdown description Radiant stores with a dataset is kept
inside the parquet file and beside it as <name>_description.md. Requires R (Rscript).
rsm.data.rds_to_parquet("~/data/*.rds") # writes ~/data/<name>.parquet
rsm.data.rds_to_parquet("~/data", out_dir="~/parquet") # every .rds/.rda in a folder
rsm.data.read_description("~/data/diamonds.parquet")
Or from a terminal: rds2parquet ~/data/*.rds (rds2parquet --help for options).
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.
Metadata
Release files for pyrsm 2.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyrsm-2.5.0.tar.gz | 780.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyrsm-2.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / pyrsm-2.5.0.tar.gz
| Download URL | pyrsm-2.5.0.tar.gz |
|---|---|
| Size | 780.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c89ab87945340e9ad30b279f72879b5840b5f2a8cb52b32890280df2545e6e4
|
|
BLAKE2b-256 checksum How to use checksums |
0f7642918893575da4cdb0b4f05b7c822ff374fc35e9aff118a987a63df99fa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / pyrsm-2.5.0-py3-none-any.whl
| Download URL | pyrsm-2.5.0-py3-none-any.whl |
|---|---|
| Size | 647.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
485fa157fd6c3a4afbb0a67e72c44418bb522a247dcd61c5c1b95b4efa70025e
|
|
BLAKE2b-256 checksum How to use checksums |
e3c880768e76973886c57a1fb212dd4725b69b2077e7974ab50152eae3913726
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Security for pyrsm 2.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.