Microsoft Data Mining Development: validation and presentation of the model

Source: Internet
Author: User
Tags define join

Validating a data mining model

Typically, for a particular case, we can't pinpoint which mining algorithm is the most accurate, so we define multiple mining models in a mining structure, and we get the most accurate one by validating multiple mining models.

DMX (Data Mining Extension)

DMX is the language used to query data from the data mining model. It looks very similar to SQL, but the language is not easy to learn (at present there is no information available on DMX at home), and perhaps Microsoft realizes that DMX is difficult to write and has a lot of writing DMX templates, mainly for Model Content,model management,prediction Queries and Structure Content, based on the following figure readers can experience DMX in SQL Server mangement Studio.

From a programming standpoint, prediction Queries should use the most, sharing some of my own experience in writing prediction Queries. Microsoft Business Intelligence platform, SQL Server Reporting Services is the main reporting platform, we can use the SSRS provided by some UI interface to help us better write DMX. Now we need to check which customers might buy bikes and what percentage they might buy. about how to use SSRS Common reports are part of this section, so go directly to the Query Editor, as shown below:

After we select the case table, the columns in the mining model are automatically associated with the columns in the case table, and then we can simply drag and drop the Mining model Columns or case table that needs to be displayed Columns Drag to the matrix below, when we click on the button (switch DMX code and UI) to switch to the DMX code interface. So far I've got a standard DMX prediction Query,

 SELECT T.firstname, T.lastname, (Predict ([Bike Buyer])) as [Predictedvalue], (predictprobability ([Bike Buyer]) As [probability] from [TM Decision) Prediction JOIN OPENQUERY ([Adventure works DW], ' SELECT [FirstName], [  
LastName], [Customerkey], [MaritalStatus], [Gender], [Yearlyincome], [Totalchildren], [Numberchildrenathome], [Houseownerflag], [numbercarsowned], [commutedistance] from [dbo].  
[DimCustomer] ' As T on [TM Decision]. [Marital Status] = T.[maritalstatus] and [TM Decision tree]. [Gender] = T.[gender] and [TM Decision tree]. [Yearly Income] = T.[yearlyincome] and [TM Decision tree]. [Total Children] = T.[totalchildren] and [TM Decision]. [Number Children at home] = T.[numberchildrenathome] and [TM Decision]. [House Owner Flag] = T.[houseownerflag] and [TM Decision]. [number Cars owned] = t.[numbercarsowned] and [TM Decision tree]. [Commute Distance] = t.[commutedistance] 

On the basis of the above code, we can edit, such as we need to use input parameters to control the display of data; define parameter @buyer, @Possible, we can do this by adding some simple where conditions, such as:

WHERE
(Predict ([Bike Buyer]) = @Buyer and
predictprobability ([Bike Buyer]) > @Possible

Of course, by changing the prediction JOIN, we can also remove some attributes that have little effect on the predictable column.

Is it a lot easier to write DMX than from scratch?

Mining results show

The above mentioned SQL Server Reporting Services is Microsoft Business Intelligence Platform preferred reporting platform, but does not mean that we have to use it to show the report, we can also use asp.net (c#/vb.net + adomd.net + DMX), or even Excel (SQL Server 2005/2008 plug-in) connects the SQL Server instance where the data mining model resides to show the results of the mining.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.