Dementia diagnosis: ensemble model
Two stacked ensembles comprising seven models, built to diagnose dementia with high accuracy and efficiency - with strong potential for real-world clinical application.
- Sector
- Machine learning, healthcare
- Role
- Researcher and developer
- Scope
- Feature analysis, ensemble architecture, tuning, evaluation
- Tools
- Python, scikit-learn, XGBoost
- Dataset
- 1,000 rows, 24 columns
- Year
- 2024-2025
The seven models
Two stacked ensembles were developed, each comprising seven models:
- Random Forest
- Gradient Boosting
- AdaBoost
- Bagging Classifier
- ExtraTreesClassifier
- XGBClassifier
- HistGradientBoosting
Dataset
The dataset contains 1,000 rows and 24 columns, covering various parameters related to the health and lifestyle factors of people, with a focus on their dementia status.
Stacking
To solve the problem of diagnosing dementia in patients, stacking was chosen - it allows the power of different models to be combined, improving the accuracy of the final prediction.
Model training and prediction
Calculation results: high accuracy of the stacking ensemble - Accuracy 1.0, and ideal values of ROC AUC 1.0, Precision 1.0, Recall 1.0 and F1 Score 1.0. For the stacking ensemble these indicate that the model accurately distinguishes between classes and predicts cases of dementia with absolute accuracy.
Optimisation of models
To further improve the models, the GridSearchCV hyperparameter search method from the sklearn.model_selection library was used to tune the hyperparameters of each model.
Model configuration
A new model was created for the second stacking ensemble using the obtained hyperparameters. The new ensemble was trained and the time spent was measured. The validity of the results was assessed using cross-validation for the second ensemble, and the results compared.
Results
The tests showed high accuracy and efficiency of both stacking ensembles, reaching metric values of 1.0, which indicates the model copes successfully with the task.
In the course of improving the models by adjusting the hyperparameters, the indicators of time spent on training and prediction for the second stacking ensemble were improved.
In conclusion, the constructed model can potentially be used as a tool for diagnosing dementia in clinical practice.
The companion project is a convolutional network reading chest X-rays.