Mining Model Viewer Tasks and Instructions

Overview

The Mining Model Viewer in SQL Server Data Mining provides a graphical interface for exploring, testing, and visualizing mining models. This page lists the primary tasks you can perform in the viewer and provides detailed instructions for each.

Common Tasks

  • Viewing model structure and parameters.
  • Running test queries against the model.
  • Generating charts for classification, clustering, and association rules.
  • Exporting model visualizations as images.
  • Saving and publishing modifications to the model.

Step‑by‑Step Instructions

1. Open the Mining Model Viewer

  1. In SQL Server Management Studio (SSMS), connect to the Analysis Services instance.
  2. Navigate to Databases > YourDatabase > Mining Models.
  3. Right‑click the desired model and select ViewMining Model Viewer.

2. Explore Model Structure

  1. The left pane shows the model diagram. Hover over any node to see its properties.
  2. Click a node to display detailed attributes in the properties panel below.

3. Run a Test Query

4. Generate a Chart

  1. Select Chart from the toolbar.
  2. Choose a chart type (e.g., Decision Tree, Cluster Plot).
  3. Configure the axes and click Generate.

Sample Code

The following MDX query demonstrates how to retrieve the top 5 predicted classes for a given input record.

SELECT
  TOPCOUNT(
    Predict(
      [MiningModel].[Classification],
      '{
        "Age": 35,
        "Income": 72000,
        "Education": "Bachelor"
      }'
    ),
    5
  ) ON COLUMNS
FROM [YourCube];