PredictVariance (DMX)
適用於: SQL Server Analysis Services
傳回指定數據行的變異數。
語法
PredictVariance(<scalar column reference>)
套用至
純量數據行。
傳回類型
純量數據行參考>所<指定之型別的純量值。
備註
如果數據行參考是離散的, PredictVariance 會傳回 0,因為無法從離散值計算變異數。
範例
下列範例會使用自然預測聯結來判斷個人是否可能是以TM判定樹採礦模型為基礎的自行車購買者,也會判斷預測的變異數。
SELECT
[Bike Buyer],
PredictVariance([Bike Buyer]) AS [Variance]
FROM
[TM Decision Tree]
NATURAL PREDICTION JOIN
(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