Predict (MDX)

Returns a value of a numeric expression evaluated over a data mining model.

Syntax

Predict(Mining_Model_Name,String_Expression) 

Arguments

  • Mining_Model_Name
    A valid string expression that represents the name of a mining model.

  • String_Expression
    A valid string expression that evaluates to a valid DMX expression for the specified mining model.

Remarks

The Predict function evaluates the specified string expression within the context of the specified mining model.

Data mining syntax and functions are documented in Data Mining Expressions (DMX) reference.

Example

The following example predicts name of the cluster and the distance from it of a particular customer using the Customer Clusters mining model:

WITH MEMBER MEASURES.CLNAME AS 
PREDICT("Customer Clusters", "Cluster()")
MEMBER MEASURES.CLDISTANCE AS 
PREDICT("Customer Clusters", "ClusterDistance(Cluster())")
SELECT {MEASURES.CLNAME, MEASURES.CLDISTANCE} ON 0 
FROM [Adventure Works]
WHERE([Customer].[Customer Geography].[Customer].&[12012])

See Also

Reference