π΅οΈββοΈ Supervised Learning
In machine learning, both classification and regression are types of supervised learning tasks, but they are used for different types of problems.
Chap05_Linear Regression, Ridge, Lasso, νκ·νκ°μ§ν, Scaling.pdf
1. Classification:
- Use Case: Classification is used when the output variable is a category or a label. The goal is to predict which category or class the input data belongs to.
- Examples:
- Email Spam Detection: Given an email, classify it as either spam or not spam.
- Image Recognition: Classify images of handwritten digits into their respective numbers (e.g., recognizing digits in a postal code).
- Disease Diagnosis: Predict whether a patient has a certain disease or not based on medical test results.
- Sentiment Analysis: Determine the sentiment (positive, negative, neutral) of a piece of text.
2. Regression:
- Use Case: Regression is used when the output variable is a real or continuous value. The goal is to predict a quantity, such as a price, temperature, or some other numerical value.
- Examples:
- House Price Prediction: Predict the price of a house based on features such as size, number of bedrooms, and location.
- Stock Price Prediction: Forecast the future price of a stock based on historical data and other relevant factors.
- Temperature Prediction: Predict the temperature for the next day based on historical weather data.
- Sales Prediction: Estimate the number of sales for a product based on various factors like advertising budget, seasonality, etc.
In summary, use classification when the output is a category or label, and use regression when the output is a continuous value. The choice between classification and regression depends on the nature of the problem and the type of output you are trying to predict.