This repository is for the paper Exploratory machine learning modeling of adaptive and maladaptive personality traits from passively sensed behavior. If you use the data or the code in this repository, please cite the paper.
@article{yan2022exploratory,
title={Exploratory machine learning modeling of adaptive and maladaptive personality traits from passively sensed behavior},
author={Yan, Runze and Ringwald, Whitney R and Vega, Julio and Kehl, Madeline and Bae, Sang Won and Dey, Anind K and Low, Carissa A and Wright, Aidan GC and Doryab, Afsaneh},
journal={Future Generation Computer Systems},
volume={132},
pages={266--281},
year={2022},
publisher={Elsevier}
}
We built two types of modeling: day-level modeling and person-level modeling. For the day-level modeling, the input is daily features and one partipants have multiple values for one daily feature. For the person-lvel modeling, we aggreate multiple daily values into one person feature, which is the input of the ml learning pipline. Two modeling processes share the same ML pipeline. The ML pipeline includes three basic ML models: Lasso regression (Lasso), Random Forest regression (RF), and XGBoost regression (XGB). The fundamental training process is leave-one-particiapnt-out cross-validation, and the evaluation metrics includes MSE and MAE.
-
- Go to
param.py
to set the reading path of dataset and thresholds used for cleaning dataset and selecting features. - Go to
ml_param.py
to set the hyper-parameter space used for tuning parameters.
- Go to
-
- For the day-level modeling, run
pre_process_day.ipynb
. - For the person-level modeling, run
pre_process_person.ipynb
.
- For the day-level modeling, run
-
- For the day-level modeling, run the
day_model_lasso.ipynb
,day_model_rf.ipynb
,day_model_xgb.ipynb
- For the person-level modeling, run the
person_model_lasso.ipynb
,person_model_rf.ipynb
,person_model_xgb.ipynb
- For the day-level modeling, run the
-
- Run the
visualization.ipynb
to plot the radar plots of MSE and MAE for day-level and person-level modeling respectively.
- Run the
-
Step 5: Ranking sensor features and analyzing the correlation between sensor feature and personality Trait.
- Run the
heatmap.ipynb
to get the matrix of ranking scores and correlation - Run the
heatmap.py
to get the Figure 8 in the paper.
- Run the