Classification model
Logistic Regression
Predicting binary outcomes using the logistic (sigmoid) function to model probabilities.
Logistic Regression is a classification algorithm that models the probability of a binary outcome using the logistic function. Despite its name, it's used for classification, not regression. The sigmoid function transforms linear combinations of features into probabilities between 0 and 1.
Formula
P(y=1) = 1 / (1 + e^-(ฮฒโ + ฮฒโxโ + ... + ฮฒโxโ))
How it works
- Calculates a linear combination of input features
- Applies the sigmoid function: ฯ(z) = 1/(1 + eโปแถป)
- Output represents probability of positive class
- Uses threshold (typically 0.5) to make class predictions
- Optimizes coefficients using maximum likelihood estimation
When to use it
- For binary classification problems
- When you need probability estimates
- When interpretability is important
- As a baseline for classification tasks
- When relationship between log-odds and features is linear
Advantages
- Provides probability estimates
- Coefficients are interpretable as log-odds
- Fast to train and predict
- Works well for linearly separable data
- Less prone to overfitting
Limitations
- Assumes linear decision boundary
- Requires feature engineering for non-linear relationships
- Sensitive to outliers
- Cannot handle complex relationships
- May underperform with many features
Example uses
- Spam detection
- Disease diagnosis
- Customer churn prediction
- Credit approval
- Click-through rate prediction
Related models
Need a model built on your data?
Tell us the decision you want to improve. We will tell you whether your data can support it and which approach fits.