PredictNodeId (DMX)
適用於:SQL Server Analysis Services
傳回分類案例之節點的Node_ID。
語法
PredictNodeId(<scalar column reference>)
套用至
純量數據行。
傳回類型
<純量表達式>
範例
下列範例會傳回指定的個人是否可能購買自行車,也會傳回其最有可能加入之節點的 nodeID。
SELECT
[Bike Buyer],
PredictNodeId([Bike Buyer])
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
然後,您可以使用下列語句來判斷節點中包含的內容:
SELECT
NODE_CAPTION
FROM
[TM Decision Tree].CONTENT
WHERE NODE_UNIQUE_NAME= '00000000100'