12Predicting Binary Outcomes
In this chapter we discuss a simple to understand technique for predicting binary outcomes—-nearest-neighbors (-NNs). After completing this chapter, you should be able to:
- Distinguish between predicting a numerical outcome and predicting a binary outcome
- Classify binary outcome data using -nearest neighbors in Python
- Divide the data into training and validation partitions to optimize the choice of
- Explain whether -nearest-neighbors can be used for explanatory modeling
Many, if not most, statistical analyses and decisions involve binary outcomes: a consumer buys or doesn’t buy, a prospect responds or doesn’t respond, a patient dies or survives, a loan is paid off or goes into default, a person votes for your candidate or not, a link is clicked or not, etc. The structure of the data is the same as we have seen in multiple linear regression, except the outcome (dependent) variable is binary instead of continuous. Another term for this is classification—predicting ...
Get Statistics for Data Science and Analytics 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.