Summary

In the context of machine learning, we train a model and test it to predict or forecast an outcome. In this chapter, we have had an in-depth look at the simple yet extremely effective method of linear regression to predict a quantitative response. The later chapters will cover more advanced techniques, but many of them are mere extensions of what we have learned in this chapter. We've discussed the problem of not visually inspecting the dataset and simply relying on the statistics to guide you in model selection.

With just a few lines of code, you can make powerful and insightful predictions to support decision-making. Not only is it simple and effective, you can also include quantitative variables and interaction terms among the features. ...

Get R: Unleash Machine Learning Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.