Giter VIP home page Giter VIP logo

aapecs's Introduction

AAPECS

Machine learning (ML) pipline for Predicting Adaptive and Maladaptive Traits

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}
}

Instructions

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.

  • Step 1: Configure the parameter and directory.

    • 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.
  • Step 2: clean the dataset.

    • For the day-level modeling, run pre_process_day.ipynb.
    • For the person-level modeling, run pre_process_person.ipynb.
  • Step 3: Run the ML pipline.

    • 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
  • Step 4: Visualize the evaluatiion of ML performance.

    • Run the visualization.ipynb to plot the radar plots of MSE and MAE for day-level and person-level modeling respectively.
  • 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.
  • (* ml_models.py contains code of training ml models, imputation.py contains code of filling missing values, pre_process.py contains code of cleaning dataset)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.