Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Intelligent Choices Preceeding Data Analysis Katharina Morik Univ. Dortmund, www-ai.cs.uni-dortmund.de Knowledge Discovery in Databases (KDD) The Mining.

Similar presentations


Presentation on theme: "1 Intelligent Choices Preceeding Data Analysis Katharina Morik Univ. Dortmund, www-ai.cs.uni-dortmund.de Knowledge Discovery in Databases (KDD) The Mining."— Presentation transcript:

1 1 Intelligent Choices Preceeding Data Analysis Katharina Morik Univ. Dortmund, www-ai.cs.uni-dortmund.de Knowledge Discovery in Databases (KDD) The Mining Mart approach Case studies –Item sales –Intensive care

2 2 The UCI Library Approach Learning task: classification Evaluation criteria: accuracy and coverage Data sets –Small number of examples –Small number of features –All and only relevant features included –No noise

3 3 KDD Task Learning task of the application needs to be transferred to a formal learning task (classification, regression, clustering) –„I want to predict sales 4 weeks ahead“ –„I want to know more about my best (worst) customers“ –„I want to detect fraud“ Databases –Very large number of records –Very large number of features –Relevant fatures missing –Noise included

4 4 Observation Experienced users can apply any learning system successfully to any application, since they prepare the data well... The representation L E of examples and the choice of a sample determines the applicability of learning methods. A chain of data transformations (learning steps or manual preprocessing) leads to L E of the method that delivers the desired result. Experienced users remember prototypical successful transformation/learning chains

5 5 L E1 L H1 L E2 L H2... L En-1 L Hn-1 = L En L Hn L Hn+m L En+m... L Hn+1 = L En+1 learning/data mining The Real Process application: data users performance system

6 6 Intelligent Choices 80% of the KDD work is invested into: Choosing the learning task Sampling Feature generation, extraction, and selection Data cleaning Model selection or tuning the hypothesis space Defining appropriate evaluation criteria

7 7 The Mining Mart Approach Best practice cases of preprocessing chains exist... Data, L E and L H are described on the meta level. The meta-level description is presented in application terms. MiningMart users choose a case and apply the corresponding transformation and learning chain to their application.... and more can be obtained!

8 8 Call for Participation MiningMart develops an operational meta-language for describing data and operators. MiningMart prepares the first cases of KDD. MiningMart will present the case-base in the WWW. You may contribute to the endavour! –Apply the meta-language to your application and deliver it as a positive example to the case-base; or –apply a case of MiningMart to your data.

9 9 The Consortium Katharina Morik Univ. Dortmund, D (Coordinator) Lorenza Saitta Univ. Piemonte del Avogadro, I Pieter Adriaans Perot Systems Netherland, NL ?Michael May GMD, D Jörg-Uwe Kietz SwissLife, CH Fabio Malabocchia TILab, I

10 10 The Mining Mart System Manual Pre-processing Operators: Time multi-relation Meta-data Applicability ML-Operators: Time Parameters Features Description Logic Raw-data Meta-data Augmented data of results Meta-data KDD process tasks, problem models Case-base of successful KDD process Human Computer Interface

11 11 The Meta Model for Meta Data The Relational Model describes the database The Conceptual Model describes the individuals and classes of the domain with their relations The Case Model describes chains of preprocessing operators The Execution Model generates SQL statements or calls to external tools

12 12 Use of the Meta Model The meta model is stored in a database. The database manager delivers the relational model. The data analyst delivers the conceptual model. The KDD expert delivers or adjusts a case model. First cases are delivered by the Mining Mart project. The system compiles meta data into SQL statements and calls to external tools hence executing the case model on the data.

13 13 Sales of Items of a Drugstore 0 20 40 60 80 100 120 140 160 01|9607|9613|9619|9625|9631|9637|9643|9649|96 03|97 09|9715|9721|9727|9733|9739|9745|9751|9705|9811|9817|9823|9829|9835|9841|9847|9853|98 Week Sales Insect killers 1 Insect killers 2 Sun milk Candles 1 Baby food 1 Beauty Sweets Self-tanning cream Candles 2 Baby food 2

14 14 Learning Task 1: Predict Sales of an Item Given drug store sales data of 50 items in 20 shops over 104 weeks predict the sales of an item such that the prediction never underestimates the sale, the prediction overestimates less than the rule of thumb. Observation: 90% of the items are sold less than 10 times a week. Requirement: prediction horizon is more than 4 weeks ahead.

15 15 Shop Application -- Data LE DB1 : I: T 1 A 1... A 50 ; set of multivariate time series

16 16 Preprocessing From shops to items: multivariate to univariate L E1´ : i:t 1 a 1... t k a k For all shops for all item s: Create view Univariate as Select shop, week, item i Where shop=“dm j ” From Source; Multiple learning

17 17 Method 1 for Task 1: Exponential Smoothing Univariate time series as input ( LE 1` ), incremental method: current hypothesis h and new observation o yield next hypothesis by h := h +  o, where is given by the user, predicts sales of n-next week by last h.

18 18 Method 2 for Task 1: SVM in the Regression Mode Multiple learning: for each shop and each item, the support vector machine learns a function which is then used for prediction. Asymmetric loss: –underestimation is multiplied by 20, i.e. 3 sales too few predicted -- 60 loss –overestimation is counted as it is, i.e. 3 sales too much predicted -- 3 loss (Stefan Rüping 1999)

19 19 Further Preprocessing Obtaining many vectors from one series by sliding windows L H5 i:t 1 a 1... t w a w move window of size w by m steps

20 20 windowhorizon value to predict time sales Article 766933 (bag?)

21 21 Comparison with Exponential Smoothing

22 22 loss horizon

23 23 Learning Task 2: Learning Sequences Are there typical sequences that are valid for all items? –After an action for an item its sales decrease. –Each decrease of sales is followed by an increase. Given a set of subsequent events find frequent sequences.

24 24 Univariate time series ? Subsequent events ? L Hn-1 = L En L Hn frequent event sequences From Sales Data to Event Sequences Multivariate time series ?

25 25 From Series to Sequences Given some time series detect events (states, intervals) An event is a triple (state, begin,finish). The state might be a label or a (mean) value. Typical labels are: increase, decrease, stable...

26 26 Unsupervised Methods All contiguous observations within one level (range) form one event (Bauer). All contiguous observations with more or less the same gradient form one event (Morik, Wessel). Clusters of subsequences form events (Das).

27 27 Moving Gradient Time 14571012 Determining the time intervals with user-given tolerance threshhold. Abstracting into classes of gradients: increase,peak,decrease, stable...

28 28 Sales of Item 182830 in Shop 55

29 29 Summarizing Sales by Tolerant Moving Gradient (Wessel, Morik 1999)

30 30 Univariate time series Moving gradient Subsequent events ? L Hn-1 = L En L Hn frequent event sequences From Subsequent Events to Event Sequences Multivariate time series ?

31 31 Transformation into Facts stable(182830,1,33,0). decreasing(182830, 33,34,-6). stable(182830, 34, 39,0). increasing(182830, 39, 40,7). decreasing(182830, 40, 42,-5). stable(182830, 42,108,0). L E4 :

32 32 Summarizing Item 646152 in Shop 55 by Intolerant Moving Gradient

33 33 Corresponding Facts increasing(646152,1,2,3). decreasing(646152,2,3,-11). increasingPeak(646152,3,4,22).... stable(646152, 25,37,0). increasing(646152, 37, 38, 8). decreasing(646152, 38, 39, -7). stable(646152, 39,40, 0). increasing(646152, 40, 41,7). decreasing(646152, 41, 42,-8). increasing(646152, 42, 43,10). stable(646152, 43, 48,-1). small time intervals

34 34 Method 3 for Task 2: Inductive Logic Programming Rules about sequences: p 1 (I, T b, T e, A r ), p 2 (I, T e, T e2, A s )  p 3 (I, T e2, T e3, A t ) Results for sequences of sales trends: increasing (Item, T b, T e )  decreasing(Item, T e, T e2 ) increasing (Item, T b, T e ), decreasing(Item, T e, T e2 )  stable(Item, T e2, T e3 )

35 35 Same Data -- Several Cases Predict sales of a particular item in a particular shop multivariate to univariate, multiple exponential smoothing OR multivariate to univariate, sliding windows, multiple learning with regression SVM Find relations between trends that are valid for all sales in all shops multivariate to univariate, summarizing, transformation into facts, rule learning

36 36 Applications in Intensive Care On-line monitoring of intensive care patients high-dimensional data about patient and medication measured every minute stored in the Emtec database of patient records --- learning when to intervene in which way.

37 37 Patient G.C., male, 60 years old Hemihepatektomie right

38 38 The Data LE DB2 i 1 : t 1 a 1 1... a 1 k i 1 : t 2 a 2 1... a 2 k... i 2 : t 1 a 1 1... a 1 k... set of rows for each patient: 1 row for each minute

39 39 Preprocessing Chaining database rows i 1 : t 1 a 1 1... a 1 k, t 2 a 2 1... a 2 k,... Multivariate to univariate i 1 : t 1 a 1, t 2 a 1... t m a 1 i 1 : t 1 a 2, t 2 a 2... t m a 2... Detecting level changes and outliers

40 40 Phase State Analysis Phase stateTime series Deter- ministic Process ytyt time t ytyt y t+1 AR(1)-process with outlier (AO) ytyt timet ytyt y t+1 Heart rate HR t time t ytyt y t+1 U.Gather, M. Bauer

41 41 Level Change Detection level_change(pat4999, 50, 112, hr, up) level_change(pat4999, 112, 164, hr, down) level_change(pat4999, 10, 74, art, constant) level_change(pat4999, 74, 110, art, down) Computed Feature Comparing norm values for a vital sign and its mean in a time interval (± standard deviation): deviation(pat4999, 10, 74, art, up)

42 42 Learning Task 3: Recommend Interventions for Patients Are there valid rules for all multivariate time series, such that therapeutical interventions follow from a patient’s state?

43 43 Method 3: Inductive Logic Programming Given patient records in the form of facts: deviations -- time intervals therapeutical interventions -- time points types of vital signs (group1: hr, swi, co; group2: art, vr) Learn rules about interventions: group1(V), deviation(P, T1, T2, V, Dir)  noradrenaline(P, T2, Dir)

44 44 The Chain of Preprocessing Steps LE DB2 : i 1 : t 1 a 1 1... a 1 k i 1 : t 2 a 2 1... a 2 k... i 2 : t 1 a 1 1... a 1 k chaining db rows i 1 : t 1 a 1 1... a k1 t 2 a 1 2... a k 2... i 2 : t 1 a 1 1... a k 1 t 2 a 1 2... a k 2... multi- to univariate i 1 : t 1 a 1 1 t 2 a 1 2 i 1 : t 1 a 2 1 t 2 a 2 2... level changes (i 1,t i,t j, A)... computed feature (i 1,t i,t j, A,D) relational learning p 1 (I,T i,T j, A,D), p 2 (I,T j,T k, A,D)  p 3 (I,T k, Dir)

45 45 Learning Task 4: Predict Next Minute‘s Intervention Given a patient’s state at time t i, learn whether and how to intervene at t i+1 Preprocessing: Selection of time points where an intervention was done Multiple to binary class for each drug, form the concepts drug_up, drug_down Multiple learning for each binary class resulting in classifiers for each drug and direction of dose change (SVM_light)

46 46 The Chain of Preprocessing Steps LE DB2 : i 1 : t 1 a 1 1... a 1 k i 1 : t 2 a 2 1... a 2 k... i 2 : t 1 a 1 1... a 1 k Select time points with interventions i 1 : t i a 1 i... a ki i 2 : t j a 1 j... a kj... Form binary classes a 1 _up + : a 2... a k... a 1 _up - : a 2... a k.... a 6 _down + : a 2... a k.. a 6 _down - : a 2... a k.... Learning classifiers using SVM_light a 1 _up + : w 2 a 2... w k a k... a 6 _down + : w 2 a 2... w k a k

47 47 Same Data -- Several Cases Find time relations that express therapy protocols chaining db rows, multivariate to univariate, level changes, deviations, RDT Predict intervention for a particular drug select time points, multiple to binary class, SVM_light

48 48 Behind the Boxes Db schema indicating time attribute(s), granularity,... Select statement in abstract form, instantiated by db schema Creating views in abstract form, instantiated by db schema and learning task Calling SVM_light and writing results Syntactic transformation for SVM Multiple learning control

49 49 Functionality of MD-Compiler Manual preprocessing operators of M4 are very elementary. Results of operators are mostly views.

50 50 Several view definitions Physical View-Object created by MD-Compiler for reading data and executing statistics Inline-View stored as sql-string in M4-Relational Inline View versus Physical View-Object

51 51 Several view definitions Inline View versus Physical View-Object Create View V_05 (...) as select... from (select... from (select... from Table_x) instead of Create View V_05 (...) as select... from V_04

52 52 Several view definitions Materialized view: Created by the MD-Compiler automatically in the background + performance gain when selecting data from V_04 or V_07 + all operation-outputs can be realized as views - additional storage needed

53 53 System-Architecture Mining Mart Database T1 T4 T2T3 T5 T6 MD Compiler Java-Code M4- Relation Editor Statistics PL/Sql Time Operators Java-Code from UniDo M4-Relational Model M4-Case Model M4- Concept Editor M4-Conceptual Model M4-Case Editor

54 54 Summary of Cases Involving Time Db schema indicating time attribute(s) Inductive logic programming (RDT) SVM_light for classification SVM for regression Exponential smoothing Syntactic transformations L E1... L E4 Sliding windows Summarizing windows Level changes

55 55 Summary Preprocessing is the key issue in data analysis! Goal: Support users in making intelligent choices Approach: Cases of best practice View of a computer scientist: –Scalability to very large databases –Meta-data driven processing Case studies on analysing data involving time

56 56 MiningMart Approach Manager -- end-user knows about the business case Database manager knows about the data Case designer -- power-user expert in KDD Developer supplies (learning) operators


Download ppt "1 Intelligent Choices Preceeding Data Analysis Katharina Morik Univ. Dortmund, www-ai.cs.uni-dortmund.de Knowledge Discovery in Databases (KDD) The Mining."

Similar presentations


Ads by Google