Modular data analysis and ML workflow toolkit
Project description
prepstack
prepstack is a modular data analysis and machine learning workflow toolkit designed to reduce repetitive preprocessing, validation, and experimentation overhead while preserving full transparency and user control.
It provides explicit, composable building blocks for common prepstackl and ML tasks, with optional guidance for interpretability and correctness.
#Design Principles
⦁ Explicit over implicit No hidden transformations or silent assumptions.
⦁ Modular by default Each step is independently callable and testable.
⦁ Guardrails, not automation prepstack highlights risks and inconsistencies without enforcing opinionated pipelines.
⦁ Learning-aware execution Optional guidance explains what is happening and why, without changing results.
⦁ Notebook and production friendly Identical APIs for exploration and deployment.
#Installation
pip install prepstack
#Guidance Mode
All functions support a guidance parameter:
guidance="on" # descriptive output, warnings, suggestions guidance="off" # silent execution
This allows prepstack to be used both as a learning aid and as a production utility.
#Module Overview
⦁ prepstack.cleaning - Basic data hygiene and structural cleanup
⦁ prepstack.transform - Feature transformation, encoding, scaling, joins, and aggregation
⦁ prepstack.explore - Structured exploratory analysis
⦁ prepstack.model_prep - Validation, feature selection, splitting, and class balancing
⦁ prepstack.model - Model fitting and prediction wrappers
#Example Workflow
import pandas as pd
df = pd.DataFrame({ "user_id": range(1, 51), "age": [22,25,30,35,40]*10, "country": ["US","IN","US","UK","IN"]*10, "usage": [5,10,20,30,40]*10, "plan": ["free","free","pro","pro","free"]*10, "churn": [0,0,1,1,0]*10 })
from prepstack.cleaning import clean_basic from prepstack.transform.columns import encoding, scaling, string_ops from prepstack.model_prep.feature_selection import combined_feature_selection from prepstack.model_prep.splits import stratified_split from prepstack.model_prep.class_balance import smote_balance from prepstack.model_prep.validation.core import validate_full from prepstack.model import fit_model, predict from prepstack.model_prep.evaluation import classification_metrics, evaluation_summary
1️⃣ CLEAN
df1 = clean_basic(df, guidance="on")
2️⃣ TRANSFORM
df2 = string_ops.clean_strings(df1, columns=["country", "plan"], guidance="on") df3 = df3, encoding_info = encoding.encode_category( df2, columns=["country", "plan"], method="onehot", guidance="on")
df4 = scaling.scale_numeric( df3, cols=["age", "usage"], method="standard", guidance="on")
3️⃣ VALIDATE
validate_full( df4, schema={"age": "float64", "usage": "float64", "churn": "int64"}, guidance="on" )
4️⃣ FEATURE SELECTION
selected_features = combined_feature_selection(df4, target="churn", guidance="on")
X = df4[selected_features] y = df4["churn"]
5️⃣ SPLIT
X_train, X_test, y_train, y_test = stratified_split( df4[selected_features + ["churn"]], target="churn", guidance="on" )
6️⃣ BALANCE
Xb, yb = smote_balance(X_train, y_train, guidance="on")
7️⃣ MODEL
model = fit_model(Xb, yb, model_type="logistic", guidance="on")
8️⃣ EVALUATE
preds = predict(model, X_test)
metrics = classification_metrics(y_test, preds, guidance="on")
evaluation_summary(metrics, task="classification", guidance="on")
#Intended Use Cases
⦁ Reusable analytics pipelines
⦁ SaaS / churn / behavioural datasets
⦁ ML experimentation with safety checks
⦁ Analysts transitioning into modeling
⦁ Teams that want consistency without abstraction loss
#Scope & Non-Goals
prepstack does not aim to replace:
⦁ pandas
⦁ scikit-learn
⦁ specialized AutoML frameworks
⦁ Instead, it standardizes the glue logic between them.
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 prepstack-0.1.0.tar.gz.
File metadata
- Download URL: prepstack-0.1.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd2a326ab081d719f7e3d80914f21f11ff2023082e7eeac85d0b7a019b6d568d
|
|
| MD5 |
d341e2317ca151b2556155335e4ba42d
|
|
| BLAKE2b-256 |
2ec3024e7d3100a9ca914f2c3eabf7c13bf792e3fe9ac5e9afd0c41e9662bc74
|
File details
Details for the file prepstack-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prepstack-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6af092c86ab97b695adaab614f042f2d2151e68eca74643c20db4af376ab9178
|
|
| MD5 |
bfa6f5ec16f17be56ac423d862bbc367
|
|
| BLAKE2b-256 |
bdcf5f3df52c6b79b3f6da4bca21a8f8eafc3beaa2615973f8f5e9a306f186ce
|