How do classification and regression differ? Give an example of each.
Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Saved automatically
Model Answer & Deep-Dive Explanation
Classification predicts a category or category probability, such as whether a customer will cancel a subscription. Regression predicts a numerical quantity, such as next month’s energy usage. The business target determines the task, not whether the input columns contain numbers. A model that estimates cancellation probability still supports a classification problem, and the final decision needs a threshold. Evaluate classification with suitable class-sensitive metrics and regression with errors in meaningful units. The cost of errors and deployment conditions should guide metric selection.
Related Questions in Data Science & Machine Learning
Why should training, validation, and test datasets have different roles?
Easy level • 2 views
Why does feature scaling matter for some models more than others?
Medium level • 2 views
What does PCA do, and what are its limitations?
Medium level • 1 views
How would you handle a dataset where several rows belong to the same patient?
Medium level • 1 views
How would you compare two models without mistaking random variation for an improvement?
Medium level • 1 views