Dr-P/amy-commitment-analysis
0
Organizational Commitment Analysis — Research Portal
A full research portal for explainable ML analysis of organizational commitment (Stay vs. Leave). Designed for publication-ready analysis with complete audit trail.
Features
Data & Preprocessing
- Upload Excel (
.xlsx/.xls) or CSV files - Dynamic column selection — choose features, target, and categorical vs numeric columns
- Preprocessing pipeline: imputation, scaling, feature selection, class balancing
Machine Learning Models
- Logistic Regression, Random Forest, XGBoost, SVM (RBF), PyTorch MLP
- Hyperparameter controls with per-model sliders
- Auto-tune via Optuna (Bayesian) or GridSearchCV fallback
- 5-fold stratified cross-validation with F1 scoring
Explainable AI
- Permutation Feature Importance (PFI) — model-agnostic, all models
- SHAP values — TreeExplainer for tree models, KernelExplainer for others
- LRP (Layerwise-Relevance Propagation) — epsilon and alpha-beta rules on the MLP
- Logistic Regression coefficients — log-odds with direction
Portal Tools
- Google Drive resource library integration
- Claude-powered Code Assistant — modify source files via natural language
- Full equations reference with LaTeX-rendered math and citations
- Append-only Decision Log with complete audit trail, exportable as
.txt
Independent Variables
- Gender (M / F / NB)
- Education (HS → PhD, ordinal)
- Ethnicity (5 categories)
- Marital Status (Single / Married / Divorced / Widowed)
- Reason for Joining (Career / Service / Family Tradition / Education Benefits / Camaraderie)
- Ideology (1–7 Likert)
Dependent variable: Commitment — Stay (1) or Leave (0)
Tabs
- Home / Resources — welcome, instructions, Google Drive folder
- Data — load synthetic (N=300) or upload your own Excel/CSV; select columns
- Preprocessing — imputation, scaling, feature selection, class balancing
- Model Config & Train — hyperparameter sliders, auto-tune, train all models
- Performance — accuracy, F1, AUC, confusion matrices
- Explainability — PFI, SHAP, LRP (mean + per-sample), LogReg coefficients
- Equations & Rationale — full math with citations (Breiman 2001, Bach 2015, Montavon 2019)
- Code Assistant — read and modify source files via Claude API
- Decision Log — timestamped audit trail, exportable
File Upload Format
Any Excel/CSV with at least one numeric or categorical feature column and a binary target. Built-in synthetic dataset requires no upload.
Environment
For the Code Assistant tab, set ANTHROPIC_API_KEY in a .env file or as a HF Space Secret.
