PredictVariance (DMX)
返回指定列的方差。
语法
PredictVariance(<scalar column reference>)
适用范围
一个标量列。
返回类型
一个由 <scalar column reference> 指定类型的标量值。
注释
如果引用的是离散列,则由于不能对离散值计算方差,PredictVariance 将返回 0。
示例
以下示例根据 TM Decision Tree 挖掘模型,使用自然预测联接确定某个人是否可能购买自行车,并且还确定该预测的方差。
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