Chapter 4 Data Mining Primitives Languages and System

  • Slides: 77
Download presentation
Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What defines a data mining task? n A data mining query language n Design graphical user interfaces based on a data mining query language n Architecture of data mining systems n Summary 10 March 2021 Data Mining: Concepts and Techniques 1

Unit II n Data Mining Primitive, Languages, and System Architecture : n Data mining

Unit II n Data Mining Primitive, Languages, and System Architecture : n Data mining primitive, n Data Mining Query Languages, n Designing Graphical User Interfaces Based on a Data Mining Query Language n Architecture of Data Mining Systems 10 March 2021 Data Mining: Concepts and Techniques 2

Data Mining Primitives, Languages, and System Architecture n n n Misconception: Data mining systems

Data Mining Primitives, Languages, and System Architecture n n n Misconception: Data mining systems can autonomously dig out all of the valuable knowledge from a given large database, without human intervention. If there was no user intervention the system would uncover a large set of patterns that may even surpass the size of the database. Hence, user interference is required. This user communication with the system is provided by using a set of data mining primitives. 10 March 2021 Data Mining: Concepts and Techniques 3

Why Data Mining Primitives and Languages? n n n A popular misconception about data

Why Data Mining Primitives and Languages? n n n A popular misconception about data mining is to expect that data mining systems can autonomously dig out all of the valuable knowledge and patterns that is embedded in large database, without human intervention or guidance. Finding all the patterns autonomously in a database? — unrealistic because the patterns could be too many but uninteresting Data mining should be an interactive process n User directs what to be mined Users must be provided with a set of primitives to be used to communicate with the data mining system Incorporating these primitives in a data mining query language n More flexible user interaction n Foundation for design of graphical user interface n Standardization of data mining industry and practice 10 March 2021 Data Mining: Concepts and Techniques 4

Data Mining Primitives : What Defines a Data Mining Task ? n Task-relevant data

Data Mining Primitives : What Defines a Data Mining Task ? n Task-relevant data : What is the data set I want to mine? n n Type of knowledge to be mined : What kind of knowledge do I want to mine ? Background knowledge : What background knowledge could be useful here ? n n Pattern interestingness measurements : What measures can be useful to estimate pattern interestingness ? Visualization of discovered patterns : How do I want the discovered patterns to be presented ? 10 March 2021 Data Mining: Concepts and Techniques 5

Primitives for specifying a data mining task 10 March 2021 Data Mining: Concepts and

Primitives for specifying a data mining task 10 March 2021 Data Mining: Concepts and Techniques 6

Task-Relevant Data (Minable View) n n n The first primitive is the specification of

Task-Relevant Data (Minable View) n n n The first primitive is the specification of the data on which mining is to be performed. Typically, a user is interested in only a subset of the database. It is impractical to mine the entire database, particularly since the number of patterns generated could be exponential w. r. t the database size. Furthermore, many of the patterns found would be irrelevant to the interests of the user. In a relational database, the set of task relevant data can be collected via a relational query involving operations like selection, projection, join and aggregation. This retrieval of data can be thought of as a “subtask” of the data mining task. The data collection process results in a new data relational called the initial data relation 10 March 2021 Data Mining: Concepts and Techniques 7

n n n The initial data relation can be ordered or grouped according to

n n n The initial data relation can be ordered or grouped according to the conditions specified in the query. The data may be cleaned or transformed (e. g. aggregated on certain attributes) prior to applying data mining analysis. This initial relation may or may not correspond to physical relation in the database. Since virtual relations are called Views in the field of databases, the set of task-relevant data for data mining is called a minable view If data mining task is to study associations between items frequently purchased at All. Electronics by customers in Canada, the task relevant data can be specified by providing the following information 10 March 2021 Data Mining: Concepts and Techniques 8

Task-Relevant Data (Minable View) n Database or data warehouse name n Database tables or

Task-Relevant Data (Minable View) n Database or data warehouse name n Database tables or data warehouse cubes n Condition for data selection n Relevant attributes or dimensions n Data grouping criteria 10 March 2021 Data Mining: Concepts and Techniques 9

Task relevant data n n Data portion to be investigated. Attributes of interest (relevant

Task relevant data n n Data portion to be investigated. Attributes of interest (relevant attributes) can be specified. n Initial data relation n Minable view 10 March 2021 Data Mining: Concepts and Techniques 10

Example If a data mining task is to study associations between items frequently purchased

Example If a data mining task is to study associations between items frequently purchased at All Electronics by customers in Canada, the task relevant data can be specified by providing the following information: n All. Electronics_db) n (e. g. , item, customer, purchases and items_sold) n pertaining to purchases made in Canada for the current year) n from the item table and income and age from the customer table) 10 March 2021 Data Mining: Concepts and Techniques 11

The kind of knowledge to be mined It is important to specify the kind

The kind of knowledge to be mined It is important to specify the kind of knowledge to be mined, as this determines the data mining functions to be performed. The kinds of knowledge include concept description (characterization and discrimination), association, classification, predication, clustering, and evolution analysis. In addition to specifying the kind of knowledge to be mined for a given data mining task, the user can be more specific and provide pattern templates that all discovered patterns must match 10 March 2021 Data Mining: Concepts and Techniques 12

The kind of knowledge to be mined These templates, or metapatterns (also called metarules

The kind of knowledge to be mined These templates, or metapatterns (also called metarules or metaqueries), can be used to guide the discovery process. The use of metapatterns is illustrated in the following example. A user studying the buying habits of Allelectronics customers may choose to mine association rules of the form: P (X: customer, W) ^ Q (X, Y) => buys (X, Z) Here X is a key of the customer relations, P & Q are predicate variables and W, Y and Z are object variables [1. 4%, 70%] 10 March 2021 Data Mining: Concepts and Techniques 13

The kind of knowledge to be mined The search for association rules is confined

The kind of knowledge to be mined The search for association rules is confined to those matching the given metarule, such as age (X, “ 30…. . 39”) ^ income (X, “ 40 k…. 49 K”) => buys (X, “VCR”) [2. 2%, 60%] and occupation (X, “student ”) ^ age (X, “ 20…. . 29”)=> buys (X, “computer”) [1. 4%, 70%] The former rule states that customers in their thirties, with an annual income of between 40 K and 49 K, are likely (with 60% confidence) to purchase a VCR, and such cases represent about 2. 2. % of the total number of transactions. The latter rule states that customers who are students and in their twenties are likely (with 70% confidence) to purchase a computer, and such cases represent about 1. 4% of the total number of transactions. 10 March 2021 Data Mining: Concepts and Techniques 14

Types of knowledge to be mined n Characterization n Discrimination n Association n Classification/prediction

Types of knowledge to be mined n Characterization n Discrimination n Association n Classification/prediction n Clustering n Outlier analysis n Other data mining tasks 10 March 2021 Data Mining: Concepts and Techniques 15

The data mining functionalities and the variety of knowledge they discover are briefly presented

The data mining functionalities and the variety of knowledge they discover are briefly presented in the following list: Characterization: Data characterization is a summarization of general features of objects in a target class, and produces what is called characteristic rules. The data relevant to a userspecified class are normally retrieved by a database query and run through a summarization module to extract the essence of the data at different levels of abstractions. For example, one may want to characterize the Our. Video. Store customers who regularly rent more than 30 movies a year. With concept hierarchies on the attributes describing the target class, the attribute-oriented induction method can be used, for example, to carry out data summarization. Note that with a data cube containing summarization of data, simple OLAP operations fit the purpose of data characterization. 10 March 2021 Data Mining: Concepts and Techniques 16

 Discrimination: Data discrimination produces what are called discriminant rules and is basically the

Discrimination: Data discrimination produces what are called discriminant rules and is basically the comparison of the general features of objects between two classes referred to as the target class and the contrasting class. For example, one may want to compare the general characteristics of the customers who rented more than 30 movies in the last year with those whose rental account is lower than 5. The techniques used for data discrimination are very similar to the techniques used for data characterization with the exception that data discrimination results include comparative measures. 10 March 2021 Data Mining: Concepts and Techniques 17

 Association analysis: Association analysis is the discovery of what are commonly called association

Association analysis: Association analysis is the discovery of what are commonly called association rules. It studies the frequency of items occurring together in transactional databases, and based on a threshold called support, identifies the frequent item sets. Another threshold, confidence, which is the conditional probability than an item appears in a transaction when another item appears, is used to pinpoint association rules. Association analysis is commonly used for market basket analysis. For example, it could be useful for the Our. Video. Store manager to know what movies are often rented together or if there is a relationship between renting a certain type of movies and buying popcorn or pop. The discovered association rules are of the form: P -> Q [s, c], where P and Q are conjunctions of attribute value-pairs, and s (for support) is the probability that P and Q appear together in a transaction and c (for confidence) is the conditional probability that Q appears in a transaction when P is present. 10 March 2021 Data Mining: Concepts and Techniques 18

 For example, the hypothetic association rule: Rent. Type(X, "game") AND Age(X, "13 -19")

For example, the hypothetic association rule: Rent. Type(X, "game") AND Age(X, "13 -19") -> Buys(X, "pop") [s=2% , c=55%] would indicate that 2% of the transactions considered are of customers aged between 13 and 19 who are renting a game and buying a pop, and that there is a certainty of 55% that teenage customers who rent a game also buy pop. 10 March 2021 Data Mining: Concepts and Techniques 19

 Classification: Classification analysis is the organization of data in given classes. Also known

Classification: Classification analysis is the organization of data in given classes. Also known as supervised classification, the classification uses given class labels to order the objects in the data collection. Classification approaches normally use a training set where all objects are already associated with known class labels. The classification algorithm learns from the training set and builds a model. The model is used to classify new objects. For example, after starting a credit policy, the Our. Video. Store managers could analyze the customers’ behaviours vis-à-vis their credit, and label accordingly the customers who received credits with three possible labels "safe", "risky" and "very risky". The classification analysis would generate a model that could be used to either accept or reject credit requests in the future. 10 March 2021 Data Mining: Concepts and Techniques 20

 Prediction: Prediction has attracted considerable attention given the potential implications of successful forecasting

Prediction: Prediction has attracted considerable attention given the potential implications of successful forecasting in a business context. There are two major types of predictions: one can either try to predict some unavailable data values or pending trends, or predict a class label for some data. The latter is tied to classification. Once a classification model is built based on a training set, the class label of an object can be foreseen based on the attribute values of the object and the attribute values of the classes. Prediction is however more often referred to the forecast of missing numerical values, or increase/ decrease trends in time related data. The major idea is to use a large number of past values to consider probable future values. 10 March 2021 Data Mining: Concepts and Techniques 21

 Clustering: Similar to classification, clustering is the organization of data in classes. However,

Clustering: Similar to classification, clustering is the organization of data in classes. However, unlike classification, in clustering, class labels are unknown and it is up to the clustering algorithm to discover acceptable classes. Clustering is also called unsupervised classification, because the classification is not dictated by given class labels. There are many clustering approaches all based on the principle of maximizing the similarity between objects in a same class (intra-class similarity) and minimizing the similarity between objects of different classes (inter-class similarity). 10 March 2021 Data Mining: Concepts and Techniques 22

 Outlier analysis: Outliers are data elements that cannot be grouped in a given

Outlier analysis: Outliers are data elements that cannot be grouped in a given class or cluster. Also known as exceptions or surprises, they are often very important to identify. While outliers can be considered noise and discarded in some applications, they can reveal important knowledge in other domains, and thus can be very significant and their analysis valuable. 10 March 2021 Data Mining: Concepts and Techniques 23

 Evolution and deviation analysis: Evolution and deviation analysis pertain to the study of

Evolution and deviation analysis: Evolution and deviation analysis pertain to the study of time related data that changes in time. Evolution analysis models evolutionary trends in data, which consent to characterizing, comparing, classifying or clustering of time related data. Deviation analysis, on the other hand, considers differences between measured values and expected values, and attempts to find the cause of the deviations from the anticipated values. 10 March 2021 Data Mining: Concepts and Techniques 24

Background Knowledge: Concept Hierarchies n n It is the information about the domain to

Background Knowledge: Concept Hierarchies n n It is the information about the domain to be mined Concept hierarchy: is a powerful form of background knowledge. It allows the discovery of knowledge at multiple level of abstraction. Concept hierarchy defines a sequence of mappings from a set of low – level concepts to higher – level, more general concepts. A concept hierarchy for the dimension location is shown in figure, mapping low-level concepts (i. e. cities) to more general concepts (i. e. countries) Concept hierarchy consists of four levels. In our example, level 1 represents the concept country, while levels 2 and 3 represents the concepts province_or_state and city resp 10 March 2021 Data Mining: Concepts and Techniques 25

Example Level 0 all Canada British Columbia Vancouver 10 March 2021 Ontario Victoria Level

Example Level 0 all Canada British Columbia Vancouver 10 March 2021 Ontario Victoria Level 1 USA Toronto New York Ottawa New York Data Mining: Concepts and Techniques Buffalo Illinois Level 2 Chicago Level 3 26

n Four major types of concept hierarchies: Schema hierarchies Set-grouping hierarchies Operation-derived hierarchies Rule-based

n Four major types of concept hierarchies: Schema hierarchies Set-grouping hierarchies Operation-derived hierarchies Rule-based hierarchies 10 March 2021 Data Mining: Concepts and Techniques 27

Background Knowledge: Concept Hierarchies n n Schema hierarchy n E. g. , street <

Background Knowledge: Concept Hierarchies n n Schema hierarchy n E. g. , street < city < province_or_state < country Set-grouping hierarchy n E. g. , {20 -39} = young, {40 -59} = middle_aged Operation-derived hierarchy n email address: dmbook@cs. sfu. ca login -name < department < university < country Rule-based hierarchy n low_profit_margin (X) <= price(X, P 1) and cost (X, P 2) and (P 1 - P 2) < $50 10 March 2021 Data Mining: Concepts and Techniques 28

Concept hierarchies (2) n n Rolling Up - Generalization of data Allows to view

Concept hierarchies (2) n n Rolling Up - Generalization of data Allows to view data at more meaningful and explicit abstractions. Makes it easier to understand Compresses the data Would require fewer input/output operations Drilling Down - Specialization of data Concept values replaced by lower level concepts There may be more than concept hierarchy for a given attribute or dimension based on different user viewpoints Example: Regional sales manager may prefer the previous concept hierarchy but marketing manager might prefer to see location with respect to linguistic lines in order to facilitate the distribution of commercial ads. 10 March 2021 Data Mining: Concepts and Techniques 29

Schema hierarchies n n Schema hierarchy is the total or partial order among attributes

Schema hierarchies n n Schema hierarchy is the total or partial order among attributes in the database schema. Schema hierarchy may formally express existing semantic relationships between attributes. Typically a schema hierarchy specifies a data warehouse dimension Example: location hierarchy street < city < province/state < country n n This means that street is at conceptually lower level than city, which is lower than province_or_state, which is conceptually lower than country. A schema hierarchy provides metadata information. 10 March 2021 DWM 3. 1 Data Mining: Concepts and Techniques 30 30

Set-grouping hierarchies n Organizes values for a given attribute into groups or sets or

Set-grouping hierarchies n Organizes values for a given attribute into groups or sets or range of values. Total or partial order can be defined among groups. Used to refine or enrich schema-defined hierarchies. Typically used for small sets of object relationships. n Example: Set-grouping hierarchy for age n n n {young, middle_aged, senior} {20…. 29} young {40…. 59} middle_aged {60…. 89} senior 10 March 2021 all (age) Data Mining: Concepts and Techniques 31

Operation-derived hierarchies n Operation-derived: An operation derived hierarchy is based on operations specified by

Operation-derived hierarchies n Operation-derived: An operation derived hierarchy is based on operations specified by users, experts, or the data mining system. Operations may include decoding of information-encoded strings, information extraction from complex data objects, and data clustering Example: URL or email address xyz@cs. iitm. in gives login name < dept. < univ. < country 10 March 2021 Data Mining: Concepts and Techniques 32

Rule-based hierarchies n n Rule-based: Occurs when either whole or portion of a concept

Rule-based hierarchies n n Rule-based: Occurs when either whole or portion of a concept hierarchy is defined as a set of rules and is evaluated dynamically based on current database data and rule definition Example: Following rules are used to categorize items as low_profit, medium_profit and high_profit_margin. low_profit_margin(X) <= price(X, P 1)^cost(X, P 2)^((P 1 -P 2)<50) medium_profit_margin(X) <= price(X, P 1)^cost(X, P 2)^((P 1 P 2)≥ 50)^((P 1 -P 2)≤ 250) high_profit_margin(X) <= price(X, P 1)^cost(X, P 2)^((P 1 -P 2)>250) 10 March 2021 DWM 3. 1 Data Mining: Concepts and Techniques 33 33

Interestingness measure (1) n n Although specification of the task relevant data and of

Interestingness measure (1) n n Although specification of the task relevant data and of the kind of knowledge to be mined (e. g. characterization, association, etc. ) may substantially reduce the number of pattern generated, a data mining process may still generate a large number of patterns Typically, only a small fraction of these patterns will actually be of interest to the given user. Thus, users need to further confine the number of uninteresting patterns returned by the process. This can be achieved by specifying interestingness measures that estimate the simplicity, certainty, utility, and novelty of patterns We will see some objective measures of pattern interestingness. In general, each measure is associated with a threshold that can be controlled by the user. Rules that do not meet the threshold are considered uninteresting, and hence are not presented to the user as knowledge 10 March 2021 Data Mining: Concepts and Techniques 34

Interestingness measure (1) Simplicity : A factor contributing to the interestingness of a pattern

Interestingness measure (1) Simplicity : A factor contributing to the interestingness of a pattern is the pattern’s overall simplicity for human comprehension. Objective measures of pattern simplicity can be viewed as functions of the pattern structure, defined in terms of the pattern size in bits, or the number of attributes or operators appearing in the pattern. For example, the more complex the structure of a rule is, the more difficult it is to interpret, and hence, the less interesting it is likely to be Rule Length : It is a simplicity measure 10 March 2021 Data Mining: Concepts and Techniques 35

Interestingness measure (1) Certainty (Confidence) : Each discovered pattern should have a measure of

Interestingness measure (1) Certainty (Confidence) : Each discovered pattern should have a measure of certainty associated with it that assesses the validity or “trustworthiness” of the pattern. A certainty measure for association rules of the form “A =>B” where A and B are sets of items, is confidence. Confidence is a certainty measure. Given a set of task-relevant data tuples the confidence of “A => B” is defined as confidence (A=>B) = # tuples containing both A and B # tuples containing A A confidence of 85% for the rule buys(X, “computer”) => buys (X, “software”) means that 85% of all customers who purchased a computer also bought software 10 March 2021 Data Mining: Concepts and Techniques 36

Interestingness measure (1) Utility (Support) : The potential usefulness of a pattern is a

Interestingness measure (1) Utility (Support) : The potential usefulness of a pattern is a factor defining its interestingness. It can be estimated by a utility function, such as support. The support of an association pattern refers to the percentage of task relevant data tuples (or transactions) for which the pattern is true. n n Utility (support) : usefulness of a pattern support (A=>B) = # tuples containing both A and B total # of tuples A support of 30% for the above rule means that 30% of all customers in the computer department purchased both a computer and software. Association rules that satisfy both the minimum confidence and support threshold are referred to as strong association rules. 10 March 2021 Data Mining: Concepts and Techniques 37

Interestingness measure (1) Novelty : Novel patterns are those that contribute new information or

Interestingness measure (1) Novelty : Novel patterns are those that contribute new information or increased performance to the given pattern set. For ex. A data exception. Another strategy for detecting novelty is to remove redundant patterns. 10 March 2021 Data Mining: Concepts and Techniques 38

Presentation and visualization n n For data mining to be effective, data mining systems

Presentation and visualization n n For data mining to be effective, data mining systems should be able to display the discovered patterns in multiple forms, such as rules, tables, cross tabs (crosstabulations), pie or bar charts, decision trees, cubes, or other visual representations. User must be able to specify the forms of presentation to be used for displaying the discovered patterns. 10 March 2021 Data Mining: Concepts and Techniques 39

DMQL n n n Adopts SQL-like syntax Hence, can be easily integrated with relational

DMQL n n n Adopts SQL-like syntax Hence, can be easily integrated with relational query languages Defined in BNF grammar n [ ] represents 0 or one occurrence n { } represents 0 or more occurrences n Words in sans serif represent keywords 10 March 2021 Data Mining: Concepts and Techniques 40

n Motivation n n A DMQL can provide the ability to support ad-hoc and

n Motivation n n A DMQL can provide the ability to support ad-hoc and interactive data mining By providing a standardized language like SQL n n Hope to achieve a similar effect like that SQL has on relational database Foundation for system development and evolution Facilitate information exchange, technology transfer, commercialization and wide acceptance Design n DMQL is designed with the primitives described earlier 10 March 2021 Data Mining: Concepts and Techniques 41

Syntax for DMQL n n Syntax for specification of n task-relevant data n the

Syntax for DMQL n n Syntax for specification of n task-relevant data n the kind of knowledge to be mined n concept hierarchy specification n interestingness measure n pattern presentation and visualization Putting it all together — a DMQL query 10 March 2021 Data Mining: Concepts and Techniques 42

DMQL-Syntax for task-relevant data specification n n n Names of the relevant database or

DMQL-Syntax for task-relevant data specification n n n Names of the relevant database or data warehouse, conditions and relevant attributes or dimensions must be specified use database ‹database_name› or use data warehouse ‹data_warehouse_name› from ‹relation(s)/cube(s)› [where condition] in relevance to ‹attribute_or_dimension_list› order by ‹order_list› group by ‹grouping_list› having ‹condition› 10 March 2021 Data Mining: Concepts and Techniques 43

Example 10 March 2021 Data Mining: Concepts and Techniques 44

Example 10 March 2021 Data Mining: Concepts and Techniques 44

Syntax for Kind of Knowledge to be Mined n n Characterization : ‹Mine_Knowledge_Specification› :

Syntax for Kind of Knowledge to be Mined n n Characterization : ‹Mine_Knowledge_Specification› : : = mine characteristics [as ‹pattern_name›] analyze ‹measure(s)› Example: mine characteristics as customer. Purchasing analyze count% Discrimination: ‹Mine_Knowledge_Specification› : : = mine comparison [as ‹ pattern_name›] for ‹target_class› where ‹target_condition› {versus ‹contrast_class_i where ‹contrast_condition_i›} analyze ‹measure(s)› Example: Mine comparison as purchase. Groups for bigspenders where avg(I. price) >= $100 versus budgetspenders where avg(I. price) < $100 analyze count 10 March 2021 Data Mining: Concepts and Techniques 45

Syntax for Kind of Knowledge to be Mined (2) n n Association: ‹Mine_Knowledge_Specification› :

Syntax for Kind of Knowledge to be Mined (2) n n Association: ‹Mine_Knowledge_Specification› : : = mine associations [as ‹pattern_name›] [matching ‹metapattern›] Example: mine associations as buying. Habits matching P(X: customer, W) ^ Q(X, Y) => buys (X, Z) Classification: ‹Mine_Knowledge_Specification› : : = mine classification [as ‹pattern_name›] analyze ‹classifying_attribute_or_dimension› Example: mine classification as classify. Customer. Credit. Rating analyze credit_rating 10 March 2021 Data Mining: Concepts and Techniques 46

Syntax for concept hierarchy specification n More than one concept per attribute can be

Syntax for concept hierarchy specification n More than one concept per attribute can be specified Use hierarchy ‹hierarchy_name› for ‹attribute_or_dimension› Examples: Schema concept hierarchy (ordering is important) n define hierarchy location_hierarchy on address as [street, city, province_or_state, country] Set-Grouping concept hierarchy n define hierarchy age_hierarchy for age on customer as level 1: {young, middle_aged, senior} < level 0: all level 2: {20, . . . , 39} < level 1: young level 2: {40, . . . , 59} < level 1: middle_aged level 2: {60, . . . , 89} < level 1: senior 10 March 2021 Data Mining: Concepts and Techniques 47

Syntax for concept hierarchy specification (2) operation-derived concept hierarchy n define hierarchy age_hierarchy for

Syntax for concept hierarchy specification (2) operation-derived concept hierarchy n define hierarchy age_hierarchy for age on customer as {age_category(1), . . . , age_category(5)} : = cluster (default, age, 5) < all(age) rule-based concept hierarchy n define hierarchy profit_margin_hierarchy on item as level_1: low_profit_margin < level_0: all if (price - cost)< $50 level_1: medium-profit_margin < level_0: all if ((price - cost) > $50) and ((price - cost) <= $250)) level_1: high_profit_margin < level_0: all if (price - cost) > $250 10 March 2021 Data Mining: Concepts and Techniques 48

Syntax for interestingness measure specification n n with [‹interest_measure_name›] threshold = ‹threshold_value› Example: with

Syntax for interestingness measure specification n n with [‹interest_measure_name›] threshold = ‹threshold_value› Example: with support threshold = 5% with confidence threshold = 70% 10 March 2021 Data Mining: Concepts and Techniques 49

Syntax for pattern presentation and visualization specification n n display as ‹result_form› The result

Syntax for pattern presentation and visualization specification n n display as ‹result_form› The result form can be rules, tables, cubes, crosstabs, pie or bar charts, decision trees, curves or surfaces. To facilitate interactive viewing at different concept levels or different angles, the following syntax is defined: ‹Multilevel_Manipulation› : : = roll up on ‹attribute_or_dimension› | drill down on ‹attribute_or_dimension› | add ‹attribute_or_dimension› | drop ‹attribute_or_dimension› 10 March 2021 Data Mining: Concepts and Techniques 50

Architectures of Data Mining System n n With popular and diverse application of data

Architectures of Data Mining System n n With popular and diverse application of data mining, it is expected that a good variety of data mining system will be designed and developed. Comprehensive information processing and data analysis will be continuously and systematically surrounded by data warehouse and databases. A critical question in design is whether we should integrate data mining systems with database systems. This gives rise to four architecture: No coupling Loose Coupling Semi-tight Coupling Tight Coupling 10 March 2021 Data Mining: Concepts and Techniques 51

Cont. n n No Coupling: DB or DW system DM system will not utilize

Cont. n n No Coupling: DB or DW system DM system will not utilize any functionality of a Loose Coupling: DM system will use some facilities of DB and DW system like storing the data in either of DB or DW systems and using these systems for data retrieval Semi-tight Coupling: Besides linking a DM system to a DB/DW systems, efficient implementation of a few DM primitives. Tight Coupling: DM system is smoothly integrated with DB/DW systems. Each of these DM, DB/DW is treated as main functional component of information retrieval system. 10 March 2021 Data Mining: Concepts and Techniques 52

Designing Graphical User Interfaces based on a data mining query language n What tasks

Designing Graphical User Interfaces based on a data mining query language n What tasks should be considered in the design GUIs based on a data mining query language? n Data collection and data mining query composition n Presentation of discovered patterns n Hierarchy specification and manipulation n Manipulation of data mining primitives n Interactive multilevel mining n Other miscellaneous information 10 March 2021 Data Mining: Concepts and Techniques 53

Summary n n n Five primitives for specification of a data mining task n

Summary n n n Five primitives for specification of a data mining task n task-relevant data n kind of knowledge to be mined n background knowledge n interestingness measures n knowledge presentation and visualization techniques to be used for displaying the discovered patterns Data mining query languages n DMQL, MS/OLEDB for DM, etc. Data mining system architecture n No coupling, loose coupling, semi-tight coupling, tight coupling 10 March 2021 Data Mining: Concepts and Techniques 54

Measurements of Pattern Interestingness n n Simplicity e. g. , (association) rule length, (decision)

Measurements of Pattern Interestingness n n Simplicity e. g. , (association) rule length, (decision) tree size Certainty e. g. , confidence, P(A|B) = #(A and B)/ #(B), classification reliability or accuracy, certainty factor, rule strength, rule quality, discriminating weight, etc. Utility potential usefulness, e. g. , support (association), noise threshold (description) Novelty not previously known, surprising (used to remove redundant rules, e. g. , Canada vs. Vancouver rule implication support ratio) 10 March 2021 Data Mining: Concepts and Techniques 55

Visualization of Discovered Patterns n Different backgrounds/usages may require different forms of representation n

Visualization of Discovered Patterns n Different backgrounds/usages may require different forms of representation n n Concept hierarchy is also important n n n E. g. , rules, tables, crosstabs, pie/bar chart etc. Discovered knowledge might be more understandable when represented at high level of abstraction Interactive drill up/down, pivoting, slicing and dicing provide different perspectives to data Different kinds of knowledge require different representation: association, classification, clustering, etc. 10 March 2021 Data Mining: Concepts and Techniques 56

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What defines a data mining task? n A data mining query language n Design graphical user interfaces based on a data mining query language n Architecture of data mining systems n Summary 10 March 2021 Data Mining: Concepts and Techniques 57

A Data Mining Query Language (DMQL) n Motivation n n A DMQL can provide

A Data Mining Query Language (DMQL) n Motivation n n A DMQL can provide the ability to support ad-hoc and interactive data mining By providing a standardized language like SQL n n Hope to achieve a similar effect like that SQL has on relational database Foundation for system development and evolution Facilitate information exchange, technology transfer, commercialization and wide acceptance Design n DMQL is designed with the primitives described earlier 10 March 2021 Data Mining: Concepts and Techniques 58

Syntax for DMQL n n Syntax for specification of n task-relevant data n the

Syntax for DMQL n n Syntax for specification of n task-relevant data n the kind of knowledge to be mined n concept hierarchy specification n interestingness measure n pattern presentation and visualization Putting it all together—a DMQL query 10 March 2021 Data Mining: Concepts and Techniques 59

Syntax: Specification of Task-Relevant Data n use database_name, or use data warehouse data_warehouse_name n

Syntax: Specification of Task-Relevant Data n use database_name, or use data warehouse data_warehouse_name n from relation(s)/cube(s) [where condition] n in relevance to att_or_dim_list n order by order_list n group by grouping_list n having condition 10 March 2021 Data Mining: Concepts and Techniques 60

Specification of task-relevant data 10 March 2021 Data Mining: Concepts and Techniques 61

Specification of task-relevant data 10 March 2021 Data Mining: Concepts and Techniques 61

Syntax: Kind of knowledge to Be Mined n Characterization Mine_Knowledge_Specification : : = mine

Syntax: Kind of knowledge to Be Mined n Characterization Mine_Knowledge_Specification : : = mine characteristics [as pattern_name] analyze measure(s) n Discrimination Mine_Knowledge_Specification : : = mine comparison [as pattern_name] for target_class where target_condition {versus contrast_class_i where contrast_condition_i} analyze measure(s) E. g. mine comparison as purchase. Groups for big. Spenders where avg(I. price) >= $100 versus budget. Spenders where avg(I. price) < $100 analyze count 10 March 2021 Data Mining: Concepts and Techniques 62

Syntax: Kind of Knowledge to Be Mined (cont. ) n Association Mine_Knowledge_Specification : :

Syntax: Kind of Knowledge to Be Mined (cont. ) n Association Mine_Knowledge_Specification : : = mine associations [as pattern_name] [matching <metapattern>] E. g. mine associations as buying. Habits matching P(X: custom, W) ^ Q(X, Y)=>buys(X, Z) n Classification Mine_Knowledge_Specification : : = mine classification [as pattern_name] analyze classifying_attribute_or_dimension n Other Patterns clustering, outlier analysis, prediction … 10 March 2021 Data Mining: Concepts and Techniques 63

Syntax: Concept Hierarchy Specification n To specify what concept hierarchies to use hierarchy <hierarchy>

Syntax: Concept Hierarchy Specification n To specify what concept hierarchies to use hierarchy <hierarchy> for <attribute_or_dimension> n We use different syntax to define different type of hierarchies n schema hierarchies define hierarchy time_hierarchy on date as [date, month quarter, year] n set-grouping hierarchies define hierarchy age_hierarchy for age on customer as level 1: {young, middle_aged, senior} < level 0: all level 2: {20, . . . , 39} < level 1: young level 2: {40, . . . , 59} < level 1: middle_aged level 2: {60, . . . , 89} < level 1: senior 10 March 2021 Data Mining: Concepts and Techniques 64

Concept Hierarchy Specification (Cont. ) n operation-derived hierarchies define hierarchy age_hierarchy for age on

Concept Hierarchy Specification (Cont. ) n operation-derived hierarchies define hierarchy age_hierarchy for age on customer as {age_category(1), . . . , age_category(5)} : = cluster(default, age, 5) < all(age) n rule-based hierarchies define hierarchy profit_margin_hierarchy on item as level_1: low_profit_margin < level_0: all if (price - cost)< $50 level_1: medium-profit_margin < level_0: all if ((price - cost) > $50) and ((price - cost) <= $250)) level_1: high_profit_margin < level_0: all if (price - cost) > $250 10 March 2021 Data Mining: Concepts and Techniques 65

Specification of Interestingness Measures n Interestingness measures and thresholds can be specified by a

Specification of Interestingness Measures n Interestingness measures and thresholds can be specified by a user with the statement: with <interest_measure_name> threshold = threshold_value n Example: with support threshold = 0. 05 with confidence threshold = 0. 7 10 March 2021 Data Mining: Concepts and Techniques 66

Specification of Pattern Presentation n Specify the display of discovered patterns n display as

Specification of Pattern Presentation n Specify the display of discovered patterns n display as <result_form> To facilitate interactive viewing at different concept level, the following syntax is defined: Multilevel_Manipulation : : = roll up on attribute_or_dimension | drill down on attribute_or_dimension | add attribute_or_dimension | drop attribute_or_dimension 10 March 2021 Data Mining: Concepts and Techniques 67

Putting it all together: A DMQL query use database All. Electronics_db use hierarchy location_hierarchy

Putting it all together: A DMQL query use database All. Electronics_db use hierarchy location_hierarchy for B. address mine characteristics as customer. Purchasing analyze count% in relevance to C. age, I. type, I. place_made from customer C, item I, purchases P, items_sold S, works_at W, branch where I. item_ID = S. item_ID and S. trans_ID = P. trans_ID and P. cust_ID = C. cust_ID and P. method_paid = ``Am. Ex'' and P. empl_ID = W. empl_ID and W. branch_ID = B. branch_ID and B. address = ``Canada" and I. price >= 100 with noise threshold = 0. 05 display as table 10 March 2021 Data Mining: Concepts and Techniques 68

Other Data Mining Languages & Standardization Efforts n n n Association rule language specifications

Other Data Mining Languages & Standardization Efforts n n n Association rule language specifications n MSQL (Imielinski & Virmani’ 99) n Mine. Rule (Meo Psaila and Ceri’ 96) n Query flocks based on Datalog syntax (Tsur et al’ 98) OLEDB for DM (Microsoft’ 2000) n Based on OLE, OLE DB for OLAP n Integrating DBMS, data warehouse and data mining CRISP-DM (CRoss-Industry Standard Process for Data Mining) n Providing a platform and process structure for effective data mining n Emphasizing on deploying data mining technology to solve business problems 10 March 2021 Data Mining: Concepts and Techniques 69

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What defines a data mining task? n A data mining query language n Design graphical user interfaces based on a data mining query language n Architecture of data mining systems n Summary 10 March 2021 Data Mining: Concepts and Techniques 70

Designing Graphical User Interfaces Based on a Data Mining Query Language n What tasks

Designing Graphical User Interfaces Based on a Data Mining Query Language n What tasks should be considered in the design GUIs based on a data mining query language? n Data collection and data mining query composition n Presentation of discovered patterns n Hierarchy specification and manipulation n Manipulation of data mining primitives n Interactive multilevel mining n Other miscellaneous information 10 March 2021 Data Mining: Concepts and Techniques 71

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What defines a data mining task? n A data mining query language n Design graphical user interfaces based on a data mining query language n Architecture of data mining systems n Summary 10 March 2021 Data Mining: Concepts and Techniques 72

Data Mining System Architectures n Coupling data mining system with DB/DW system n No

Data Mining System Architectures n Coupling data mining system with DB/DW system n No coupling—flat file processing, not recommended n Loose coupling n n Semi-tight coupling—enhanced DM performance n n Fetching data from DB/DW Provide efficient implement a few data mining primitives in a DB/DW system, e. g. , sorting, indexing, aggregation, histogram analysis, multiway join, precomputation of some stat functions Tight coupling—A uniform information processing environment n 10 March 2021 DM is smoothly integrated into a DB/DW system, mining query is optimized based on mining query, indexing, query processing methods, etc. Data Mining: Concepts and Techniques 73

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What

Chapter 4: Data Mining Primitives, Languages, and System Architectures n Data mining primitives: What defines a data mining task? n A data mining query language n Design graphical user interfaces based on a data mining query language n Architecture of data mining systems n Summary 10 March 2021 Data Mining: Concepts and Techniques 74

Summary n n n Five primitives for specification of a data mining task n

Summary n n n Five primitives for specification of a data mining task n task-relevant data n kind of knowledge to be mined n background knowledge n interestingness measures n knowledge presentation and visualization techniques to be used for displaying the discovered patterns Data mining query languages n DMQL, MS/OLEDB for DM, etc. Data mining system architecture n No coupling, loose coupling, semi-tight coupling, tight coupling 10 March 2021 Data Mining: Concepts and Techniques 75

References n n n n n E. Baralis and G. Psaila. Designing templates for

References n n n n n E. Baralis and G. Psaila. Designing templates for mining association rules. Journal of Intelligent Information Systems, 9: 7 -32, 1997. Microsoft Corp. , OLEDB for Data Mining, version 1. 0, http: //www. microsoft. com/data/oledb/dm, Aug. 2000. J. Han, Y. Fu, W. Wang, K. Koperski, and O. R. Zaiane, “DMQL: A Data Mining Query Language for Relational Databases”, DMKD'96, Montreal, Canada, June 1996. T. Imielinski and A. Virmani. MSQL: A query language for database mining. Data Mining and Knowledge Discovery, 3: 373 -408, 1999. M. Klemettinen, H. Mannila, P. Ronkainen, H. Toivonen, and A. I. Verkamo. Finding interesting rules from large sets of discovered association rules. CIKM’ 94, Gaithersburg, Maryland, Nov. 1994. R. Meo, G. Psaila, and S. Ceri. A new SQL-like operator for mining association rules. VLDB'96, pages 122 -133, Bombay, India, Sept. 1996. A. Silberschatz and A. Tuzhilin. What makes patterns interesting in knowledge discovery systems. IEEE Trans. on Knowledge and Data Engineering, 8: 970 -974, Dec. 1996. S. Sarawagi, S. Thomas, and R. Agrawal. Integrating association rule mining with relational database systems: Alternatives and implications. SIGMOD'98, Seattle, Washington, June 1998. D. Tsur, J. D. Ullman, S. Abitboul, C. Clifton, R. Motwani, and S. Nestorov. Query flocks: A generalization of association-rule mining. SIGMOD'98, Seattle, Washington, June 1998. 10 March 2021 Data Mining: Concepts and Techniques 76

www. cs. uiuc. edu/~hanj Thank you !!! 10 March 2021 Data Mining: Concepts and

www. cs. uiuc. edu/~hanj Thank you !!! 10 March 2021 Data Mining: Concepts and Techniques 77