PredictVariance (DMX)
适用于: SQL Server Analysis Services
返回指定列的方差。
语法
PredictVariance(<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