Mining Model Designer
The Mining Model Designer provides a visual environment for creating, configuring, and testing data mining models in SQL Server Analysis Services (SSAS). It integrates with Visual Studio and SQL Server Data Tools (SSDT) to let you design models without writing code.
Key Features
- Drag‑and‑drop interface for selecting columns, defining attributes, and setting algorithm parameters.
- Automatic data preview showing sample rows and statistical summaries.
- Model validation with cross‑validation, holdout, and bootstrap options.
- Result visualizations such as decision trees, clustering plots, and association rules.
- Deployability – generate XML for the model definition and deploy directly to an SSAS instance.
Getting Started
- Open SQL Server Data Tools and create a new Analysis Services Multidimensional and Data Mining Project.
- Right‑click the
Data Miningfolder and choose New Mining Model. - Select a Mining Structure (or create a new one) that defines the source data view.
- Choose an Algorithm (e.g., Microsoft Decision Trees, Microsoft Cluster).
- Configure model properties using the property grid on the right.
- Click Process to train the model.
- Use the Model Viewer to explore results.
Designing a Model
The designer surface consists of three panes:
- Data Source View (DSV) – shows available tables/columns.
- Attributes Pane – drag columns here to define inputs and outputs.
- Properties Pane – configure algorithm‑specific settings.
Example: Building a Decision Tree
// No code needed – visual steps:
1. Select the "AdventureWorks" DSV.
2. Drag "ProductCategory" as the Predictor.
3. Drag "SalesAmount" as the Target.
4. Choose "Microsoft Decision Trees" as the algorithm.
5. Set "Maximum Height" to 5.
6. Process the model.
7. Open the Tree Viewer to see splits.
Testing and Validation
After processing, you can evaluate the model using the Mining Model Tester:
- Enter sample input values and view predicted results.
- Run Cross‑validation to get accuracy metrics (e.g., classification error, RMSE).
- Export the
.mdlfile for offline analysis.
Deploying the Model
To make the model available to client applications:
- Right‑click the model in Solution Explorer and choose Deploy.
- Specify the target SSAS server name and database.
- Confirm deployment; the model becomes part of the SSAS instance and can be queried via DMX or the
OPENQUERYfunction.
Best Practices
- Always partition large source tables to improve processing time.
- Use Attribute Relationships to improve algorithm performance.
- Validate models with a separate test set to avoid over‑fitting.
- Document model parameters in the
Commentsproperty for future maintenance.