Page 186 - DCAP606_BUSINESS_INTELLIGENCE
P. 186
Unit 13: Creating Data Mining Queries and Reports
Notes
[Car Buyer] AS Buyer, PredictHistogram([Car Buyer]) AS Statistics
The AS statement is used to alias columns returned by the query. The PredictHistogram
function returns statistics about the prediction, including the probability and the support.
4. Replace the following:
[<mining model>]
with:
[Decision Tree]
5. Replace the following:
(SELECT ‘<value>’ AS [<column name>], ...) AS t
with:
(SELECT 35 AS [Age],
‘5-10 Miles’ AS [Commute Distance],
‘1’ AS [House Owner ],
2 AS [Number Bikes Owned],
2 AS [Total Children]) AS t
The complete statement should now be as follows:
SELECT
[Car Buyer] AS Buyer,
PredictHistogram([Car Buyer]) AS Statistics
FROM
[Decision Tree]
NATURAL PREDICTION JOIN
(SELECT 35 AS [Age],
‘5-10 Miles’ AS [Commute Distance],
‘1’ AS [House Owner],
2 AS [Number Bikes Owned],
2 AS [Total Children]) AS t
6. On the File menu, click Save DMXQuery1.dmx As.
7. In the Save As dialog box, browse to the appropriate folder, and name the file
Singleton_Query.dmx.
8. On the toolbar, click the Execute button.
!
Caution The query returns a prediction about whether a customer with the specified
characteristics will purchase a car, as well as statistics about that prediction.
13.1.5 Batch Query
The next step is to use the SELECT FROM <model> PREDICTION JOIN (DMX) in a batch
prediction query.
LOVELY PROFESSIONAL UNIVERSITY 181