1. Trang chủ
  2. » Công Nghệ Thông Tin

Pro SQL Server 2008 Analysis Services- P7

50 368 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 50
Dung lượng 2,04 MB

Nội dung

CHAPTER 11  DATA MINING 281 Sum(Case EnglishProductCategoryName When 'Accessories' Then 1 Else 0 End) As Accessories From dbo.vDMPrepAccessories Group By CustomerKey, Region, Age ) As D On C.CustomerKey = D.CustomerKey GO This code creates the vAccessoryBuyers view that we will be using throughout the rest of this chapter. This view joins DimCustomer to a derived table, D, which is based on the vDMPrepAccessories view you created earlier. You now have your ClothingBuyer and AccessoryBuyer data points. Creating the Accessory Campaign Data Source View In addition to the views defined in the preceding section, you will need a new data source view (DSV) that references the vAccessoryBuyers view and the ProspectiveBuyer table. The ProspectiveBuyer table is populated with your campaign targets. In Exercise 11-1, you will create the AccessoryCampaign DSV. Because this DSV is virtually identical to the one you created in Chapter 5, I will list the instructions only, without the dialog box figures. Exercise 11-1. Create the AccessoryCampaign DSV Following are the steps to create a DSV for the AccessoryCampaign: 1. Open the AdventureWorks solution that you’ve been using for these exercises. 2. Right-click the Data Source Views folder in the Solution Explorer pane, and click New Data Source View. The Data Source View Wizard introduction dialog box appears; click Next. 3. In the Select a Data Source dialog box, choose Adventure Works DW from your Relational Data Sources, and click Next. 4. For the Select Tables and Views dialog box, choose vAccessoryBuyers and ProspectiveBuyer from the Available Objects and move them to the Included Objects area. Click Next. 5. Name this DSV AccessoryCampaign and click Finish. 6. AccessoryCampaign.dsv should now appear in your Data Source Views folder. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 282 Finding Accessory Buyers by Using the AdventureWorks EDW Now that you have your views implemented, your next exercise is to create a new data-mining model. Do that by following the steps in Exercise 11-2. You will use the Microsoft Decision Trees algorithm to mine the AdventureWorks data warehouse. Your goal is to find a target population of potential accessory buyers. Exercise 11-2. Use the Data Mining Wizard Follow these steps to create a data-mining model: 1. Open the AdventureWorks solution that you’ve been using for these exercises. 2. Right-click the Mining Structures folder in the Solution Explorer pane, and click New Mining Structure. The Data Mining Wizard introduction dialog box appears; click Next. 3. The Select the Definition Method dialog box appears, as shown in Figure 11-1; choose From Existing Relational Database or Data Warehouse, and click Next. Figure 11-1. Selecting the definition method Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 283 4. In the Create the Data Mining Structure dialog box, shown in Figure 11-2, leave Create Mining Structure with a Mining Model selected, and choose Microsoft Decision Trees from the Which Data Mining Technique Do You Want to Use drop- down. Click Next. Figure 11-2. Selecting a data-mining technique 5. In the Select Data Source View dialog box, shown in Figure 11-3, choose AccessoryCampaign from your Available Data Source Views, and click Next. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 284 Figure 11-3. Selecting the AccessoryCampaign data source view 6. You will now see the Specify Table Types dialog box. As shown in Figure 11-4, select the Case check box for vAccessoryBuyers. Click Next. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 285 Figure 11-4. Choosing vAccessoryBuyers as your Case table 7. Now you get to think about the actual analysis you’ll be doing. In the Key column, leave CustomerKey selected as your Key. For your Input columns, choose the following thirteen fields: Age, CommuteDistance, EnglishEducation, EnglishOccupation, Gender, GeographyKey, HouseOwnerFlag, MaritalStatus, NumberCarsOwned, NumberChildrenAtHome, Region, TotalChildren, and finally YearlyIncome. This model requires two Predictable columns; choose AccessoryBuyer and ClothingBuyer. Your selections should mimic Figure 11-5. When you are finished, click Next. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 286 Figure 11-5. Choosing training data Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 287 8. In the Specify Columns’ Content and Data Type dialog box, shown in Figure 11-6, there are two changes that you need to make. Change Accessory Buyer and Clothing Buyer to Discrete in the Content Type column. Click Next. Figure 11-6. Specifying column content and type 9. The Create Testing Set dialog box, shown in Figure 11-7, is where you will specify some inputs regarding how you would like your model to be trained. For this exercise, leave the Percentage of Data for Testing option set to 30 percent, and Maximum Number of Cases in Testing Data blank. Click Next. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 288 Figure 11-7. Entering testing set inputs 10. Now you can finalize your wizard entries by entering a name for your structure and model. Enter AccessoryBuyersCampaign as your Mining Structure Name and AB_DecisionTree for your Mining Model Name. Finally, as shown in Figure 11-8, be sure to select the Allow Drill Through check box. Click Finish. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 289 Figure 11-8. Completing the Data Mining Wizard After the wizard completes, the Data Mining Model Designer will fill your workspace. Next, you will explore the functionality of each of the five tabs within the designer. Using the Data Mining Model Designer The Data Mining Model Designer will be your main work area, now that you have finished defining your model with the Data Mining Wizard. The Data Mining Model Designer consists of the following tabs: Mining Structure: This is where you modify and process your mining structure. Mining Models: Here you create or modify models from your mining structure. Mining Model Viewer: This view enables you to explore the models you have created. Mining Accuracy Chart: Here you can view various mining charts. Later in this chapter, you will use this tab to look at and review a lift chart. Mining Model Prediction: Using this view, you will create and review the predictions your mining model asserts. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. CHAPTER 11  DATA MINING 290 The Mining Structure View The Mining Structure view is separated into two panes, as shown in Figure 11-9. The leftmost pane displays your mining structure columns, and your data source view is shown on the right. You will also process your mining model here, using the Process the Mining Structure button on the toolbar. Click the Process the Mining Structure button (leftmost button in view toolbar) now to begin processing. Figure 11-9. The Mining Structure tab After completing some preprocessing tasks, the Process Mining Structure dialog box appears. For this model, as shown in Figure 11-10, simply click the Run button at the bottom of the dialog. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... SQL Server 2008 R2 PowerPivot is closely linked to SQL Server It depends on some key features that are new in SQL Server 2008 Release 2 (R2) Before looking at PowerPivot, it’s worth getting familiar with the key features that form its foundation About two years after the launch of SQL Server 2008, Microsoft released SQL Server 2008 R2 This launch was in conjunction with Office 2010 and SharePoint Server. .. to Transact -SQL (T -SQL) In this section of the chapter, you will use DMX to create, train, and explore the Accessory Buyers campaign with the Microsoft Naïve Bayes algorithm Use the DMX Development Environment To ready your development environment to create the DMX queries, launch SQL Server Management Studio (SSMS) In the Connect to Server dialog box, select Analysis Services from the Server Type...CHAPTER 11 DATA MINING Figure 11-10 The Process Mining Structure, ready to process our campaign When the Process Progress dialog box appears and the Status area displays Process Succeeded, click Close This returns you to the Process Mining Structure dialog box Click Close again The Mining Models View With our processing complete, you can now explore the other tabs Click the... Data Services Figure 12-1 Master Data Services web-based data management interface ■ Note MDS is a separate installation from SQL Server 2008 R2 You can find the installer, MasterDataServices.msi, in the installation media for SQL Server 2008 R2 So the question is—why do you, the Analysis Services DBA, care? If MDS is being implemented as a master data repository, you should plan to take advantage of... Services (MDS), a new feature in SQL Server 2008 R2, provides a central repository for the canonical data of an organization It’s an answer to part of the problem with stovepipes, in which Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark 311 CHAPTER 12 POWERPIVOT each stovepipe refers to some aspect of the business in a different way It also provides the data of record for... exciting combination of improvements to Microsoft Excel that enable you to do your own data analysis and mining from your desktop You can connect to a database, pull data down into Excel, perform analysis on that data, and push the results back up to your server for others in your organization to view PowerPivot provides extraordinary functionality, giving you full control over your data analysis and mining... Accessory Buyers The final product is at hand! It’s now time to predict your accessory buyers To do this, you will create and execute a DMX query that joins your mining model to your prospective buyers This type of join is called a Prediction Join, and uses the same OpenQuery syntax you used in the processing section Note the PredictProbability call to Accessory Buyer, which returns the probability of this... PB.City, PB.StateProvinceCode, PB.PostalCode, PB.Phone, PB.NumberChildrenAtHome, PB.Occupation, PB.ProspectiveBuyerKey, AB_NaiveBayes.[Accessory Buyer], PredictProbability([Accessory Buyer]) As PredictedProbability From AB_NaiveBayes Prediction Join OpenQuery ( 308 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark CHAPTER 11 DATA MINING [Adventure Works DW], 'SELECT ProspectiveBuyerKey,... by selecting ProspectiveBuyer in the next Source column, and ProspectiveBuyerKey in the Field column 5 Add other prospect information: Add additional customer information to the grid by creating six new rows For the first row, select ProspectiveBuyer as your source, followed by FirstName as your field Repeat the preceding steps five more times, adding LastName, AddressLine1, City, StateProvinceCode,... dimension associated with the measure group For example, on the Products dimension, the default member is All Products If a measure was related to Region, Product, and Employee, and I selected a specific region and specific employee, I would have a value representing sales in all products, which is not a leaf-level value I have to choose a specific product to get to a leaf-level value You can see which measures . 11-10. The Process Mining Structure, ready to process our campaign When the Process Progress dialog box appears and the Status area displays Process Succeeded,. view toolbar) now to begin processing. Figure 11-9. The Mining Structure tab After completing some preprocessing tasks, the Process Mining Structure dialog

Ngày đăng: 07/11/2013, 11:15

TỪ KHÓA LIÊN QUAN