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

This version

2.4.1

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.4.1.tar.gz (189.4 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.4.1-py3-none-any.whl (167.0 kB view details)

Uploaded Python 3

File details

Details for the file pyrsm-2.4.1.tar.gz.

File metadata

  • Download URL: pyrsm-2.4.1.tar.gz
  • Upload date:
  • Size: 189.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pyrsm-2.4.1.tar.gz
Algorithm Hash digest
SHA256 d3d8741f20b00288744c7158e3fce5f39771550fab86f7b91f5bb0ea341470ac
MD5 c776baeb2641ca56dac9702cab83ac58
BLAKE2b-256 43761c96d7be81433a35495ecad1b2a66f10a260161a9dddee2daf57824ab168

See more details on using hashes here.

File details

Details for the file pyrsm-2.4.1-py3-none-any.whl.

File metadata

  • Download URL: pyrsm-2.4.1-py3-none-any.whl
  • Upload date:
  • Size: 167.0 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.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b0045ac07d283fb8ea04f1248253127c0fd126526eabbd9bfaa8740d0f2d6ab
MD5 a14742647b035b049b6c884abcbec8f8
BLAKE2b-256 a4379eabba911f456ff594f9fbc60c18604eeba65121719de894cac09c3653a0

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