Logistic Regression

Logistic regression is a statistical method for binary classification that estimates the probability that a given input belongs to a particular class. In Microsoft SQL Server Analysis Services (SSAS) Data Mining, logistic regression is one of the supported mining models.

When to Use

Key Concepts

TermDescription
LogitThe natural log of the odds.
Odds RatioMeasure of effect size for each predictor.
Maximum LikelihoodEstimation technique used to fit the model.

Creating a Logistic Regression Model in SSAS

Use the CREATE MINING MODEL statement with the LOGISTIC REGRESSION algorithm.

CREATE MINING MODEL dbo.CustomerChurn
    USING Microsoft_LogisticRegression
    ON CustomerData
    ( 
        TargetColumn = 'Churn',
        ModelRetained = 0.9,
        PredictUseModel = 'Default'
    );

Evaluating the Model

After training, you can evaluate model performance using the SELECT statement with the PREDICT function.

SELECT 
    CustomerID,
    PredictProbability(CustomerChurn, *) AS ChurnProb,
    Predict(CustomerChurn, *) AS PredictedChurn
FROM dbo.CustomerData
WHERE PredictProbability(CustomerChurn, *) > 0.5;

Best Practices

  1. Scale numeric features to improve convergence.
  2. Encode categorical variables using one‑hot encoding or use SSAS's built‑in handling.
  3. Regularly evaluate model drift and retrain as needed.
  4. Use cross‑validation to select the optimal ModelRetained value.

References