Page 184 - DCAP606_BUSINESS_INTELLIGENCE
P. 184
Unit 13: Creating Data Mining Queries and Reports
Notes
Example: You might want to forecast the amount of expected downtime for a certain
cluster of servers, or develop a score that shows if segments of customers are expected to reply
to an advertising campaign or not. To do all these things, you need to create a prediction query.
Functionally, there are distinct types of prediction queries supported in SQL Server, depending
on the type of inputs to the query. They are shown in Table 13.1.
Table 13.1: Types of Prediction Queries
Query Type Query Options
Singleton Use a singleton query when you want to predict outcomes for a single new case,
prediction or multiple new cases. You provide the input values directly in the query, and
queries the query is executed as a single session.
Batch Use batch predictions when you have external data that you want to feed into
predictions the model, to use as the basis for predictions. To make predictions for an entire
set of data, you map the data in the external source to the columns in the model,
and then specify the type of predictive data you want to output.
The query for the entire dataset is executed in a single session, making this
option much more efficient than sending multiple repeated queries.
Time Series Use a time series query when you want to predict a value over some number of
predictions future steps. SQL Server Data Mining also provides the following functionality
in time series queries:
You can extend an existing model by adding new data as part of the query,
and make predictions based on the composite series.
You can apply an existing model to a new data series by using the
REPLACE_MODEL_CASES option.
You can perform cross-prediction.
Source: http://technet.microsoft.com/en-us/library/hh213169.aspx
13.1.1 Basic Prediction Query Design
When you create a prediction, you normally supply some piece of new information and ask the
model to develop a prediction based on the new data.
In a batch prediction query, you map the model to an external source of data by using a
prediction join.
In a singleton prediction query, you type one or more values to use as inputs.
Did u know? You can create multiple propositions using a singleton prediction query.
However, if you need to create many propositions, performance is better when you use a
batch query.
Both singleton and batch prediction queries use the PREDICTION JOIN syntax to define the new
data. The difference is in how the input side of the prediction join is specified.
In a batch prediction query, the data comes from an external data source that is specified
by using the OPENQUERY syntax.
In a singleton prediction query, the data is supplied inline as part of the query.
LOVELY PROFESSIONAL UNIVERSITY 179