Skip to main content

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 groups
  • correlation - Correlation analysis with significance tests
  • cross_tabs - Cross-tabulation with chi-square tests
  • goodness - Goodness of fit tests
  • single_mean - Single sample mean tests
  • single_prop - Single sample proportion tests
  • prob_calc - Probability calculator for common distributions

Model Module - Regression and machine learning:

  • regress - Linear regression with statsmodels
  • logistic - Logistic regression with statsmodels
  • mlp - Multi-layer perceptron (neural network) with sklearn
  • rforest - Random forest with sklearn
  • xgboost - XGBoost gradient boosting

EDA Module - Exploratory data analysis:

  • explore - Data exploration and summary statistics
  • pivot - Pivot tables
  • visualize - 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

pyrsm-2.3.0.tar.gz (170.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrsm-2.3.0-py3-none-any.whl (149.5 kB view details)

Uploaded Python 3

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

Hashes for pyrsm-2.3.0.tar.gz
Algorithm Hash digest
SHA256 827834de1bddbba89bbf25a1edefa2393ad134f9d1c5e5f52e54cbfe7b5a729a
MD5 7e4798b43f46d5000a7d344172811700
BLAKE2b-256 8271cccb3bf7d0fa609596b555d5d508f70328ab74a7574bf6d749f46a26ee05

See more details on using hashes here.

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

Hashes for pyrsm-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa5619af20cfd6762992166ef9bf7a136ad8d0f326a5410e7ea0d037a58e0366
MD5 a175141e254413ae69d294755b00653f
BLAKE2b-256 da20bacb23d0ade0c2d5ab2d54c14c0543f2ab2d96548385ecab59b785a2c1ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page