Home

Menu

Loading wiki pages...

View
Wiki Version:
<p><strong>An Introduction to Machine Learning in R</strong></p> <p>The majority of psychological research is aimed at explaining human experience and behavior with methods of inferential statistics. This is not always in line with the intention to predict psychological variables and associated outcomes with utmost precision (Yarkoni, 2017). Models and techniques from the field of machine learning were developed to achieve a maximum of predictive performance. Although machine learning models have long been considered black-boxes, recent developments have greatly increased their interpretability. For these reasons, research communities of Psychology and other Social Sciences show increasing interest in adopting these methods. </p> <p>In this workshop, we will give a non-technical introduction to the basic concepts and ideas of machine learning. We will discuss the bias variance tradeoff, overfitting, resampling techniques, model evaluation and variable selection. Participants will be introduced to the Random Forest (Breiman, 2001), a powerful, nonlinear machine learning algorithm that is known for its high predictive performance in many application settings. To demonstrate the strengths of the Random Forest, we will compare its performance with linear regression models in a series of benchmark experiments. In addition to performance evaluation, researchers are often interested in the importance of single predictors. In this regard, variable importance measures and partial dependency plots are useful. </p> <p>After this workshop, participants should be able to apply basic machine learning techniques to their own research.</p> <p>Florian & Clemens</p> <hr> <p>Prior to the workshop, please prepare the following things:</p> <ul> <li> <p>install R and Rstudio:</p> <ul> <li><a href="https://cran.r-project.org/" rel="nofollow">https://cran.r-project.org/</a></li> <li><a href="https://www.rstudio.com/products/rstudio/download/" rel="nofollow">https://www.rstudio.com/products/rstudio/download/</a></li> </ul> </li> <li> <p>install the following R packages from CRAN:</p> </li> <li>mlr, parallelMap, ggplot2, iml, glmnet, ranger, rpart </li> <li>devtools, knitr, mlbench, mvtnorm, gridExtra, rpart.plot, party <br> (optional if you want to reproduce our slides)</li> <li> <p>make sure the installation of the packages was successful<br> (especially if you work on a Mac)</p> </li> <li> <p>download the files in the OSF Storage folder</p> </li> <li> <p>charge the battery of your laptop (and don't forget your charger)</p> </li> </ul> <hr> <p>Description of the files in the OSF Storage of this repository:</p> <ul> <li><strong>ml_workshop_slides.pdf</strong> </li> <li> <p>slides used in the workshop </p> </li> <li> <p><strong>phonedata.csv</strong> </p> </li> <li>data file we use for most practical exercises in the workshop </li> <li> <p>see our slides for a description of the dataset</p> </li> <li> <p><strong>preprocessing.R</strong> </p> </li> <li>sourcing this R script loads the workshop data, does some preprocessing steps necessary for the predictive modeling analyses, and returns a final dataframe named "phonedata" </li> <li> <p>this saves workshop time for the more interesting stuff </p> </li> <li> <p><strong>ml_workshop_slides.Rmd</strong> </p> </li> <li>Rmarkdown file containing all the code to reproduce our slides</li> <li>checkout this file to see what goes on behind the scenes :)</li> <li> <p>knitting the slides in RStudio requires the knitr R package and a working version of LaTeX </p> </li> <li> <p><strong>ml_workshop.bib</strong> </p> </li> <li> <p>Bib file containing the references included in the presentation</p> </li> <li> <p><strong>Figures/</strong> </p> </li> <li>folder containing the pictures included in the presentation</li> </ul> <hr> <p><strong>Recommended Readings:</strong> </p> <p>Yarkoni, T., & Westfall, J. (2017). Choosing Prediction Over Explanation in Psychology: Lessons From Machine Learning. Perspectives on Psychological Science, 12(6), 1100–1122. <a href="https://doi.org/10.1177/1745691617693393" rel="nofollow">https://doi.org/10.1177/1745691617693393</a></p> <p>Stachl, C., Pargent, F., Hilbert, S., Harari, G. M., Schoedel, R., Vaid, S., … Bühner, M. (in press). Personality Research and Assessment in the Era of Machine Learning.European Journal of Personality. Pre-print: <a href="https://doi.org/10.31234/osf.io/efnj8" rel="nofollow">https://doi.org/10.31234/osf.io/efnj8</a></p> <hr> <p>For questions or comments, feel free to contact the authors at<br> <strong>Clemens.Stachl@psy.lmu.de</strong>, <strong>Ramona.Schoedel@psy.lmu.de</strong>, and <strong>Florian.Pargent@psy.lmu.de</strong> </p>
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.