PredictCaseLikelihood (DMX)


Updated: March 2, 2016

This function returns the likelihood that an input case will fit in the existing model. Used only with clustering models.


Return value contains the probability of the case within the model divided by the probability of the case without the model.

Return value contains the raw probability of the case, which is the product of the probabilities of the case attributes.

Models that are built by using the Microsoft Clustering and Microsoft Sequence Clustering algorithms.

Double-precision floating point number between 0 and 1. A number closer to 1 indicates that the case has a higher probability of occurring in this model. A number closer to 0 indicates that the case is less likely to occur in this model.

By default, the result of the PredictCaseLikelihood function is normalized. Normalized values are typically more useful as the number of attributes in a case increase and the differences between the raw probabilities of any two cases become much smaller.

The following equation is used to calculate the normalized values, given x and y:

  • x = likelihood of the case based on the clustering model

  • y = Marginal case likelihood, calculated as the log likelihood of the case based on counting the training cases

  • Z = Exp( log(x) – Log(Y))

Normalized = (z/ (1+z))

The following example returns the likelihood that the specified case will occur within the clustering model, which is based on the Adventure Works DW database.

  PredictCaseLikelihood() AS Default_Likelihood,  
  PredictCaseLikelihood(NORMALIZED) AS Normalized_Likelihood,  
  PredictCaseLikelihood(NONNORMALIZED) AS Raw_Likelihood,  
  [TM Clustering]  
(SELECT 28 AS [Age],  
  '2-5 Miles' AS [Commute Distance],  
  'Graduate Degree' AS [Education],  
  0 AS [Number Cars Owned],  
  0 AS [Number Children At Home]) AS t  

Expected results:


The difference between these results demonstrates the effect of normalization. The raw value for CaseLikelihood suggests that the probability of the case is about 20 percent; however, when you normalize the results, it becomes apparent that the likelihood of the case is very low.

Data Mining Algorithms (Analysis Services - Data Mining)
Data Mining Extensions (DMX) Function Reference
Functions (DMX)
General Prediction Functions (DMX)

Community Additions

© 2016 Microsoft