PsyPredict
Comparing models also means investigating data, preprocessing and the limits of evaluation.
- Survey-data experiment
- Exploratory code and notebooks
- Exploratory study; incomplete pipeline
- Python / scikit-learn / pandas / SHAP
what it is
The notebooks explore a workplace mental-health survey through classifier training and hyperparameter tuning. The target is the treatment response, not a clinical diagnosis or a need for treatment.
the problem
A score must be interpreted alongside its target, split and transformations. Saved outputs allow inspection of the comparison, but the data required to repeat it is not versioned.
the constraints
- External data
- Notebooks expect
archive/survey.csvand intermediate files. The preprocessing notebook contains a saved FileNotFoundError. - Exploratory scope
- Survey responses do not establish diagnosis, efficacy or clinical validity.
the architecture
The mental-health notebook workflow.
Survey
Inspect columns, missing values and target values.
Preprocessing
Cleaning, category encoding and split.
Evaluation
Random Forest, logistic regression and GridSearchCV.
Explainability
TreeExplainer; plotting ends in a shape error.
Streamlit, FastAPI and src/ address telco churn. They do not integrate with this mental-health workflow.
technical decisions
Two classifiers on the same split
- The notebook trains Random Forest and logistic regression on the same training and test files.
- Evaluating just one classifier.
- Logistic regression emits a convergence warning and has no scaling. The scores do not isolate algorithm quality.
Keep evaluation in notebooks
- Per-class reports, ROC-AUC and parameter search stay next to the code that produced them.
- Publishing only a final score.
- Saved outputs can become stale. Reproduction requires compatible data and environment.
limits and lessons
Unfinished explainability
The call to shap.summary_plot(shap_values[1], X_sample) ends in a shape AssertionError. The artifact does not demonstrate a working SHAP plot.
Two domains in one repository
Notebooks address mental health while interfaces and Python modules address churn. The dashboard file is empty.
current state
The result is an inspectable exploratory study. Versioned outputs record 0.79158 ROC-AUC for the tuned Random Forest on 252 test records. These values were not reproduced in this audit and do not establish clinical validity.
next questions
- Separate the churn and mental-health domains.
- Version the environment, document data provenance and review preprocessing before the split.
- Re-evaluate the scaled baseline and fix SHAP dimensions.
evidence
notebooks/04_hyperparameter_tuning_mental_health.ipynb
Fitting 5 folds for each of 108 candidates, totalling 540 fits
Best ROC-AUC score (CV): 0.8193298109672427
Test set ROC-AUC: 0.791580008823344sources and review
next: tbook