R Tutorial: Supervised Learning in R: Regression

Nina Zumal and Sean Mount explain regression as predicting numerical values from input variables. They walk through a linear regression example using cricket chirp rate to predict temperature: 16.5 chirps per second yields roughly 80°F.
Hi, this is Nina Zumal and Sean.
Mount from Win Vector llc.
Welcome to our course on regression. In machine learning, regression is the task of predicting a numerical outcome based on the values of a set of inputs or independent variables. In the statistical sense, regression is predicting the expected value of an outcome. But in the casual sense, and for the purposes of this course, we'll define regression as predicting numerical values. This distinguishes regression from classification, which is the task of making discrete predictions.
Predicting how many units of a product will sell or how much of it will sell are regression problems. Predicting if a customer will buy a product, yes or no, is a classification problem. Let's walk through an example regression task.
Here we see a scatter plot of how fast a cricket chirps chirps per second on the x axis and the temperature on the Y axis. Let's say our goal is to predict the temperature by measuring cricket chirp rate. Suppose we fit a linear regression model to this data. We'll show you how later. In this course, the predictions from this model are shown by the blue line. If we assume that temperature is linearly related to cricket chirp rate, then the blue line is the best fit line through the data and it predicts what the expected temperature should be based on the observed chirp rate. For example, suppose we hear a cricket chirping at 16.5 chirps per second. We see here that this model predicts a temperature of about 80 degrees.
Let's step back and look at the reasons for modeling. Modeling from a scientific mindset focuses on understanding the process that produced the data, how each variable affects the outcome. Modeling from an engineering or machine learning mindset focuses on predicting future events accurately and less on the relationship between variables and outcomes. In this course, we'll emphasize predicting accurately. You will learn several algorithms for fitting regression models. By the end of the course, you should have a better idea about the advantages and disadvantages of each algorithm. Now let's do an exercise to quickly review what you've learned.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







