Machine Learning
Objectives
Multiple regression is a statistical technique used to understand how multiple predictor variables influence an outcome variable. It is widely used in psychology and neuroscience to examine relationships between brain activity, cognitive performance, and behavioral variables. This week we are going to learn how to implement a multiple regression model in R and interpret its results. We are also going to discuss how regression models can be used to generate predictions about what outcomes will be observed given a new set of data. This is a primary goal of “machine learning,” a set of methods for using algorithms and statistical models to identify patterns in data and make predictions or decisions about those data.
Slides
- This module’s lecture slides
In-class exercises
We will review the concept of regression and how we can use regression to make predictions in a new set of data. We will then apply these skills to an open-access psychology dataset. Download the prediction.qmd file to get started.
Let’s put these skills into practice! On Thursday, we’ll do a “workshop” that ties together most of the skills that we’ve learned, from data wrangling to visualization to building a model predicting personality traits. Download the workshop file to get started.
Weekly assignment
In class this week, we learned how to run a regression model to predict psychological outocmes. Your homework is to go back to the vivid dataset and try to predict memory vividness. Download this csv file, which contains summary data from the vivid dataset.
Build a model to predict memory vividness for negatively valenced images, using any of the predictor variables that you think would be useful. How much variability in vividness are you able to explain? Try a few different types of models to see which ones gives you the highest R squared value with cross-validation to ensure generalizability. You should feel free to explore different combinations of predictors, model types, or data transformations. The student who achieves the highest R squared value will win a very cool brain sticker. 🧠