3. History of DMX DMX was first introduced in the OLE DB for Data Mining specification authored by Microsoft in conjunction with other vendors in 1999. The goal of DMX is to define common concepts and common query expressions for the data mining world. It is similar to what SQL has done for databases.
4.
5.
6.
7. The mining model A mining model is the object that transforms rows of data into cases and performs the machine learning using a specified data mining algorithm. A mining model is described as a subset of columns from the structure, how those columns are to be used as attributes along with the algorithm and parameters to perform machine learning on the structure data. Statistics about predictions are available as well, Additionally the learned patterns themselves can be queried to discover what the algorithm found. These patterns are generally referred to as the model content.
11. CREATING MINING STRUCTURES: The following example creates a new mining structure called New Mailing. CREATE MINING STRUCTURE [New Mailing] ( CustomerKey LONG KEY, Gender TEXT DISCRETE, [Number Cars Owned] LONG DISCRETE, [Bike Buyer] LONG DISCRETE )
12. ALTERING MINING STRUCTURES: Creates a new mining model that is based on an existing mining structure. When you use the alter structure statement to create a new mining model, the structure must already exist. Syntax: ALTER MINING STRUCTURE <structure> ADD MINING MODEL <model> ( <column definition list> [(<nested column definition list>) [WITH FILTER (<nested filter criteria>)]] ) USING <algorithm> [(<parameter list>)] FILTER keyword is used to filter condition.
13. ALTERING MINING STRUCTURES The following example adds a Naive Bayes mining model to the New Mailing mining structure and limits the maximum number of attribute states to 50. ALTER MINING STRUCTURE [New Mailing] ADD MINING MODEL [Naive Bayes] ( CustomerKey, Gender, [Number Cars Owned], [Bike Buyer] PREDICT ) USING Microsoft_Naive_Bayes (MAXIMUM_STATES = 50)
14. Data Types and Content types The following table shows the list of data types and content types for mining structure columns: Time Series models. Sequence Clustering models in nested tables.
15. DROP MINING MODEL Deletes a mining model from the database. Syntax: DROP MINING MODEL <model > ModelA model identifier. Ex: The following sample code drops the mining model NBSample. DROP MINING MODEL [NBSample]
16. NESTED TABLES Ex: Consider the following case derived from two tables, one table that contains customer information and another table that contains customer purchases. A single customer in the customer table may have multiple purchases in the purchases table, which makes it difficult to describe the data using a single row. Analysis Services provides a unique method for handling these cases, by using nested tables. The concept of a nested table is demonstrated in the following illustration.
17. The first table is the parent table has information about customers, and associates a unique identifier for each customer. The second table, the child table, contains purchases for each customer. The purchases in the child table are related back to the parent table by the unique identifier, the CustomerKey column. The third table in the diagram shows the two tables combined.
18. Prediction Predictionmeansapplying the patterns that were found in the data to estimate unknown information. Examples: of prediction might be predicting if a customer will or will not be good for a loan, estimating a credit score, determining to what cluster a case belongs, or predicting future values of a time series.
19. Prediction Join Using prediction join in this example we can come to conclusion that: ‘‘if the kid is male and class is 5, then the highest scored subject is science.’’
20. Prediction Join syntax SELECT [TOP <count>] <column references> FROM <mining model> [[NATURAL] PREDICTION JOIN <source-data> [ ON <mapping clause> ] [ WHERE <condition clause> ] [ ORDER BY <order clause> [DESC | ASC] ]] Count Optional, An integer that specifies how many rows to return. column referencesA comma-separated list of column identifiers an expressions that are derived from the mining model. mining modelA model identifier. source -dataThe source query. mapping clauseOptional, A logical expression that compares columns from the model to columns from the source query. condition clause Optional, A condition to restrict the values that are returned from the column list. order clause Optional, An expression that returns a scalar value.
21. summary History of DMX DMX Introduction DMX objects Query Syntax Prediction join syntax
22. Visit more self help tutorials Pick a tutorial of your choice and browse through it at your own pace. The tutorials section is free, self-guiding and will not involve any additional support. Visit us at www.dataminingtools.net