From the course: Introduction to Artificial Intelligence

Regression

From the course: Introduction to Artificial Intelligence

Regression

- I once worked for a company that sold vehicles online. Each time they sent a customer to an auto dealership the company earned a referral fee. For them, it was always about looking at trends in auto sales. People were much more likely to buy convertibles and sports cars in the spring and summer. Others were more likely to buy trucks and SUVs in the fall and winter. So when customers visited the website they had seasonal promotions for what people wanted to buy. One of the tools they used was regression analysis. Regression analysis is a supervised machine learning algorithm. It looks at the relationship between predictors and the outcome. Sometimes you'll hear predictors called input variables, independent variables, or even regressors. Regression analysis is a supervised machine learning algorithm. You're taking the training data and labeling the correct output. Then you're using the labeled data with the test data. The best way to think about regression is to imagine trends. As the weather gets warmer people are more likely to buy convertibles. As the weather gets cooler people are more likely to buy trucks and SUVs. Regression analysis doesn't tell you why people do these things. This is for data scientists and business analysts to figure out. It just tells you that these things are happening. Machine learning regression algorithms work in a similar way. Once you have your training data, you make a prediction then see how close you are to the outcome. Then you repeat over and over again until the system makes the most accurate prediction. In this case, the data science team thought that the change of seasons would be a great predictor for the sale of some vehicles. So they put the months as a predictor. Then they mapped that against the sales of certain vehicles. With this training data, they created a simple X and Y axis diagram. Remember that this is the simple chart that you learned from geometry. Along the Y or bottom axis they listed the names of the month, and along the X or top axis, they put the sales by vehicle type. Then they looked at the trend line. Convertibles and sports car sales would go up in May, June, and July. Then those sales would go down in September, October and November. For trucks and SUVs, it was the opposite. The more data you have available, the easier it is to make an accurate trend line. As you can imagine, regression can be enormously powerful for organizations. You can make the product available just as the customer's interested in buying. That's why large retailers like Walmart famously stock their shelves with items just as their customers taste change. People buy more Pop-Tarts in the summer and they buy more milk and cheese in the winter. They want to make sure that the shelves are filled with these items based on predicted buying trends. One interesting thing about regression analysis is that there's some question about whether it's true machine learning. That makes sense because the system isn't learning anything new. It's less about learning and more about predicting. Either way, regression is a very popular way for businesses to predict future behavior. And these trends are everywhere. If you're missing them, you're not learning from them. So take a moment to think about where regression analysis might find trends in your business. What you learn might surprise you.

Contents