Page 185 - DCAP606_BUSINESS_INTELLIGENCE
P. 185

Business Intelligence




                    Notes          13.1.2 Adding Prediction Functions

                                   In addition to predicting a value, you can customize a prediction query to return various types
                                   of information that are related to the proposition.


                                          Example: If the prediction creates a list of goods to recommend to a customer, you might
                                   furthermore desire to return the probability for each proposition, so that you can rank them and
                                   present only the peak recommendations to the client.
                                   To do this, you add prediction purposes to the query. Each model or query type supports specific
                                   functions.


                                          Example: Clustering models support special prediction purposes that supply extra details
                                   about the clusters created by the model, while time series models have functions that assess
                                   difference over time.

                                   13.1.3 Singleton Query

                                   The first step is to use the SELECT FROM <model> PREDICTION JOIN (DMX) in a singleton
                                   prediction query.


                                          Example: The following is an example of the singleton statement:
                                   SELECT <select list> FROM [<mining model name>]
                                   NATURAL PREDICTION JOIN
                                   (SELECT ‘<value>’ AS [<column>], ...)
                                   AS [<input alias>]
                                   Here, the first line of the code defines the columns from the mining model that the query should
                                   return, and specifies the mining model that is used to generate the prediction:
                                   SELECT <select list> FROM [<mining model name>]
                                   The next lines of the code define the characteristics of the customer that you use to create a
                                   prediction:
                                   NATURAL PREDICTION JOIN
                                   (SELECT ‘<value>’ AS [<column>], ...)
                                   AS [<input alias>]
                                   ORDER BY <expression>
                                   If you specify NATURAL PREDICTION JOIN, the server matches each column from the model to
                                   a column from the input, based on column names. If column names do not match, the columns
                                   are ignored.

                                   13.1.4 To Create a Singleton Prediction Query

                                   1.  In Object Explorer, right-click the instance of Analysis Services, point to New Query, and
                                       then click DMX. Query Editor opens and contains a new, blank query.
                                   2.  Copy the example of the singleton statement into the blank query.
                                   3.  Replace the following:
                                       <select list>
                                       with:





          180                               LOVELY PROFESSIONAL UNIVERSITY
   180   181   182   183   184   185   186   187   188   189   190