PsyPredict
A model that estimates mental-health treatment needs from survey data — with an explanation of what weighed in, not just a number.
- 2025
- machine learning
- published experiment
- Python · scikit-learn · SHAP · FastAPI · Docker
the problem
A screening model turns into a black box easily: a survey goes in, a number comes out, and nobody knows what led the model there. In mental health, where the data is sensitive and the decision is human, that isn't a technical detail — it's the problem.
Before that comes the raw material: survey answers need cleaning and encoding before any model has something to learn from.
the approach
The pipeline handles cleaning and encoding, then trains two comparable paths — Random Forest and logistic regression — with hyperparameter tuning. Keeping both is deliberate: each one is a verifiable counterpoint to the other.
Explainability comes in with SHAP, showing each variable's contribution to a prediction. The point is that a screening result can be argued with, not just accepted.
The project leaves through three doors: a Streamlit app for case-by-case exploration, a FastAPI service for programmatic use, and notebooks for the analysis — all packaged with Docker Compose.
where it stands
Published as an experiment on GitHub, with the preprocessing pipeline, both trained models, the importance analysis and all three interfaces running in a container.