Supervised machine learning methods in psychology: A practical introduction with annotated R code

Hannes Rosenbusch*, Felix Soldner, Anthony M. Evans, Marcel Zeelenberg

*Corresponding author for this work

Research output: Contribution to journalArticleScientificpeer-review

Abstract

Machine learning methods for prediction and pattern detection are increasingly prevalent in psychological research. We provide an introductory overview of machine learning, its applications, and describe how to implement models for research. We review fundamental concepts of machine learning, such as prediction accuracy and out-of-sample evaluation, and summarize standard prediction algorithms including linear regressions, ridge regressions, decision trees, and random forests (plus additional algorithms in the supplementary materials). We demonstrate each method with examples and annotated R code, and discuss best practices for determining sample sizes; comparing model performances; tuning prediction models; preregistering prediction models; and reporting results. Finally, we discuss the value of machine learning methods in maintaining psychology’s status as a predictive science.

Original languageEnglish
Article numbere12579
Number of pages25
JournalSocial and Personality Psychology Compass
Volume15
Issue number2
DOIs
Publication statusPublished - 2021

Keywords

  • ACCURATE
  • BEHAVIOR
  • DEPRESSION
  • PERSONALITY
  • PREDICTION
  • REGRESSION
  • RISK
  • SELECTION

Fingerprint Dive into the research topics of 'Supervised machine learning methods in psychology: A practical introduction with annotated R code'. Together they form a unique fingerprint.

Cite this