Delen via


How to: Create a Prediction Query

You can use Prediction Query Builder in the Mining Model Prediction tab of Data Mining Designer in Business Intelligence Development Studio to design and run Data Mining Extensions (DMX) prediction queries. For more information about the DMX language, see Data Mining Extensions (DMX) Reference. For a description of Prediction Query Builder, see Using the Prediction Query Builder to Create DMX Prediction Queries.

You can click the first button on the toolbar on the Mining Model Prediction tab to switch between a query design view and a query text view. When you are in the query text view, you can view the DMX code that Prediction Query Builder creates. You can also run the query, modify the query, and run the modified query. However, the modified query is not persisted if you switch back to the query design view.

To create a prediction query

  1. Click the Mining Model Prediction tab in Data Mining Designer.

  2. Click Select Model on the Mining Model table.

    The Select Mining Model dialog box opens to show all the mining structures that exist in the current project.

  3. Select the model on which you want to create a prediction, and then click OK.

  4. On the Select Input Table(s) table, click Select Case Table.

    The Select Table dialog box opens.

  5. In the Data Source list, select the data source that contains the data on which to create a prediction.

  6. In the Table/View Name box, select the table that contains the data on which to create a prediction, and then click OK.

    After you select the input table, Prediction Query Builder creates a default mapping between the mining model and the input table, based on the names of the columns. To delete a mapping, click to select the line that links the column in the Mining Model table to the mapped column in the Select Input Table(s) table, and then press DELETE. You can also manually create mappings by clicking a column in the Select Input Table(s) table and dragging it onto the corresponding column in the Mining Model table.

  7. Add any combination of the following three types of information to the Prediction Query Builder grid:

    • Predictable columns from the Mining Model box.

    • Any combination of input columns from the Select Input Table(s) box.

    • Prediction functions

    For more information about how to configure the Prediction Query Builder grid, see Using the Prediction Query Builder to Create DMX Prediction Queries.

  8. Run the query by clicking the first button on the toolbar of the Mining Model Prediction tab, and then selecting Result.