Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SQL Server 2012 Tutorials - Analysis Services Data Mining.pdf
Скачиваний:
38
Добавлен:
26.03.2016
Размер:
1.41 Mб
Скачать

define a new data source.

b.Type a name for the table that will contain the query results.

c.Use the option, Add to DSV, to create the table and add it to an existing data source view. This is useful if you want to keep all related tables for a model— such as training data, prediction source data, and query results—in the same data source view.

d.Use the option, Overwrite if exists, to update an existing table with the latest results.

You must use the option to overwrite the table if you have added any columns to the prediction query, changed the names or data types of any columns in the prediction query, or if you have run any ALTER statements on the destination table.

Also, if multiple columns have the same name (for example, the default column name Expression) you must create an alias for the columns with duplicate names, or an error will be raised when the designer tries to save the results to SQL Server. The reason is that SQL Server does not allow multiple columns to have the same name.

For more information, see Save Data Mining Query Result Dialog Box.

Next Task in Lesson

Using Drillthrough from a Model (Basic Data Mining Tutorial)

See Also

How to: Create a Prediction Query

Using the Prediction Query Builder to Create DMX Prediction Queries

Using Drillthrough on Structure Data (Basic Data Mining Tutorial)

As part of their advertising campaign, Adventure Works Cycles is sending a mailer to potential customers in the 34-40 age demographic. The marketing department has decided that they would also like to send the mailer to the customers who purchased bikes from Adventure Works Cycles more than five years ago. In this lesson you will identify customers with older bikes and retrieve their contact information. This information is not included in the model, but is included in the structure. To retrieve the contact information you will first ensure that drillthrough is enabled for the structure and then you will use drillthrough to reveal the names and addresses of the targeted customers.

For information on how to drill through to model cases, see Using Drillthrough from a Model (Basic Data Mining Tutorial).

To enable drillthrough on a mining model

40

1.In SQL Server Data Tools (SSDT), on the Mining Models tab of Data Mining Designer, right-click the TM_Decision_Tree model, and select Properties.

2.In the Properties windows, click AllowDrillthrough, and select True.

3.In the Mining Models tab, right-click the model, and select Process Model.

For more information, see Using Drillthrough on Mining Models and Mining Structures (Analysis Services - Data Mining)

To view drillthrough data from a mining model

1.In Data Mining Designer, click the Mining Model Viewer tab.

2.Select the TM_Decision_Tree model from the Mining Model list.

3.Change the Background value to 1. By doing this, you show only the part of the model that is related to customer who bought bikes.

4.Select the Microsoft Tree viewer from the Viewer list. This will force the viewer to refresh with the new filter conditions. Then, locate the Age >=34 and <41 node and right-click the node.

5.Select Drill Through, and then select Model and Structure Columns to open the Drill Through window.

6.Scroll to the Structure.Date First Purchase column to view the purchase dates for the older bikes.

7.To copy the data to the Clipboard, right-click any row in the table, and select

Copy All.

Congratulations, you have completed the basic data mining tutorial. Now that you are comfortable using the data mining tools, we recommend that you also complete the intermediate data mining tutorial, which demonstrates how to create models for forecasting, market basket analysis, and sequence clustering.

Previous Task in Lesson

Creating Predictions (Basic Data Mining Tutorial)

See Also

How to: Create a Prediction Query

Using the Prediction Query Builder to Create DMX Prediction Queries

41

Intermediate Data Mining Tutorial (Analysis

Services - Data Mining)

Microsoft Analysis Services provides an integrated environment for creating and working with data mining models. You can easily bind to data sources, create and test multiple models on the same data, and deploy models for use in predictive analysis.

In the Basic Data Mining Tutorial, you learned how to use SQL Server Data Tools (SSDT) to create a data mining solution, and you built three models to support a targeted mailing campaign for analyzing customer purchasing behavior and for targeting potential buyers.

This intermediate tutorial builds on that experience and introduces several new scenarios, including common business requirements such as forecasting and market basket analysis. You will learn how to create a time series model, an association model, and a sequence clustering model. Finally, you will learn how to use neural network to explore correlations in data and to use logistic regression for predictions.

The lessons are independent and can be completed separately.

To complete the following tutorials, you should to be familiar with the data mining tools and with the mining model viewers that were introduced in the Basic Data Mining Tutorial.

All scenarios use the data source, but you will create different data source views for different scenarios. You can do the lessons in any order as long as you create the data source first.

Lesson Scenarios

After your success with the targeted mailing campaign, you have been asked to apply your knowledge of data mining to develop several new models for use in business planning. These include the following tasks:

Forecasting: You will create a time series model, to forecast the sales of products in different regions around the world. You will develop individual models for each region and learn how to use cross-prediction.

Market basket analysis: You will create an association model, to analyze groupings of products that are purchased during visits to the Adventure Works Cycles e- commerce site. Based on this market basket model, you can recommend products to customers.

Sequence analysis: You build a sequence clustering model, to analyze the order in which customers buy products. Based on this model, you can plan changes in Web site design or new product offerings.

Factor analysis: You use a neural network model to explore the possible causes of poor service quality in call center data. Based on the insights from the preliminary

42

model, you will create a logistic regression model to predict strategies for improving customer experience.

What You Will Learn

This tutorial teaches you how to create and work with several types of data mining algorithms. This tutorial is divided into the following lessons:

Lesson 1: Modifying a Data Source (Intermediate Data Mining Tutorial)

In this lesson, you will create a new project based on the database, to support several new data sources views and many more mining models.

Lesson 2: Building the Forecasting Scenario

In this lesson, you will create a mining model that can be used as part of a forecasting scenario. You will also explore mining models that are built with the Microsoft Time Series algorithm.

You will build models for individual regions, and then build a general model that can be used for cross-prediction.

Lesson 3: Building the Market Basket Scenario

In this lesson, you will add a new data source view and learn how to work with nested tables and keys. Based on this data, you will create a mining model that can be used as part of a market basket scenario. You will also explore mining models that are built with the Microsoft Association algorithm.

Lesson 4: Building the Sequence Clustering Scenario

In this lesson, you will create a mining model that can be used as part of a sequence clustering scenario. You will also learn how to explore mining models that are built with the Microsoft Sequence Clustering algorithm.

Lesson 5 Neural Net and Logistic Regression

In this lesson, you will create several related mining models, using the Microsoft Neural Network and Microsoft Logistic Regression algorithms. You will also learn to work with data source views to explore data underlying the models.

Requirements

Make sure that the following are installed:

Microsoft SQL Server 2012

Microsoft SQL Server Analysis Services

• SQL Server with the

database.

By default, the sample databases are not installed, to enhance security. To install the official databases for Microsoft SQL Server, visit the Microsoft SQL Sample Databases page and select the appropriate version of the sample database.

43

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]