oracle data mining 11 - doag.org · count, ratio_to_report •statistische aggregationen ......
TRANSCRIPT
<Insert Picture Here>
Oracle Data Mining 11.2
Maik Sandmann Oracle Deutschland B.V. & Co. KG
2
The preceding is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
3
Agenda
• Data Mining ist Teil des Datenbankkernels
• Data Mining mit Oracle Exadata
• Data Mining Funktionen
• Data Mining Algorithmen
• Datenaufbereitung
• Predictive Analytics
• Wo finde ich Informationen über Oracle Data Mining
4
„If I had one hour to save the world, I would spend fifty-five minutes defining the problems and only five minutes finding
the solution“
Albert Einstein
http://www.wikihow.com/define-a-problem
5
Was ist Data Mining und was nicht ???
Quelle: http://www.crisp-dm.org/Process/index.htm
6
Wettbewerbsvorteile sichern
Optimierung
“Predictive” Modellierung
Forecasting / Extrapolation
Statistische Analyse
Alarmierung
Query/Drill Down
Ad hoc - Berichte
Standardberichte
“Degree of Intelligence”
We
ttb
ew
erb
sv
ort
eil
Was wäre der bestmöglichste Fall?
Was wird als Nächste passieren?
Was passiert, wenn der Trend fortläuft?
Warum ist es passiert?
Welche Aktionen sind notwendig?
Wo liegt genau das Problem?
Wie häufig, wo, wie viel mal?
Was ist passiert?
Quelle: Competing on Analytics, by T. Davenport & J. Harris
$$Analytics
Access & Berichts-wesen
7
Geschäftsanforderungen
Voraussagen individuellen Verhaltens
Finden von Segmenten oder Clustern
Beziehung zwischen Zielattributen herausfinden
Finden gleichzeitig auftretenden Events
Finden betrügerischer - oder seltener Events
Klassifizierung
Clustering
Attribute Importance
Associations
Anomaly Detection
8
Data Mining ist Teil des Datenbankkernels
• Kein Datentransfer in Drittsysteme
• Bessere Kontrolle durch Vermeidung redundanter Daten
• Vereinfachung durch automatisierte Datenaufbereitung
• Einheitliche Adminstration
• Einfache Datenaktualisierung (Refresh)
• Nutzung vorhandener analytische Funktionen in Oracle
• Integration mit den gesamten Oracle Technologie Stack
• „Ein“ Domain Konzept
• Verfügbar über PL/SQL, JAVA und SQL
select cust_id
from customers
where region = „US‟
and prediction_probability(churnmod, „Y‟ using *) > 0.8;
9
Was ist neu in Data Mining 11g Rel.1
• Kein DMSYS Schema mehr
– Data Mining Modelle werden als Data Dictionary Objekte im SYS
Schema abgelegt.
• Neue System- und Objektprivilegien für den Zugriff
• Automatic Data Preparation (ADP)
• Neue Algorithmen (z.B. Gereralized Linear Models)
– Logistische Regression (Klassifizierung)
– Regression (Regression)
• Neue SQL Minging Funktionen
– Prediction_Bounds, Add_Cost_Matrix, ...
10
Was ist neu in Data Mining 11g Rel.2
• Einführung von PMML Version 3.1 (mit 11.2.0.2)
– Siehe DBMS_DATA_MINING.IMPORT_MODEL
• 12 Algorithmen und 15 statistische Funktionen
(DBMS_STAT_FUNCS)
11
Oracle Data Miner 11g Release 2 GUI
für die Oracle Data Mining Option
• Grafisches Interface für
Datenanalysten
• SQL Developer Extension (OTN download)
• Aufzeigen der Daten -
Entdecken neuer Muster (explore)
• Erstellen und evaluieren
von DM Modellen
• Apply von “Predictive”
Modellen
• Verfügbarkeit von
analytischen Workflows
• Deployen von SQL Apply
Code / Skripten
12
Explore Data
• Thumbnail
Verteilung eines
jeden Attributs
– Gruppiert mit
Attributen
• Zusammenfassung
aller Attribute
– Min, max, stdev,
variance median,
mean, skewness,
kurtosis, etc.
13
Erstellen und Evaluieren
• Modelvergleiche
und Performanz-
ergebnisse
• Abgleich und
Tuning der
vorausssagenden
Modelle
16
SQL Developer Active Query Builder
• Neuer, einfacher,
interaktiver Query
Builder im SQL
Developer für die
Datenaufbereitung
17
Beispiel: Einfaches, Predictive SQL
Selektiere die Kunden, die mit mehr als 85% Wahrscheinlichkeit “HIGH
VALUE” Kunden sind, und zeige deren Alter und Einkommen an.
SELECT cust_id, prob
FROM (SELECT cust_id,
PREDICTION_PROBABILITY (nb_sh_clas_sample, 1 USING *) prob
FROM mining_data_apply_v
WHERE cust_id < 100011)
ORDER BY cust_id;
18
• Attribute Importance
• Classification
• Regression
Supervised Funktionen
• Association Rules
• Anomaly Detection
• Clustering
• Feature Extraction
Unsupervised Funktionen
Data Mining Funktionen (Klassen)
19
Verfügbare Algorithmen
• Decision Tree (DT)
• Naive Bayes (NB)
• Generalized Linear
Models (GLM)
• Support Vector Machine
(SVM)
• Minimum Description
Length (MDL)
Supervised Funktionen
• Apriori (AP)
• k-Means (KM)
• Non-Negative Matrix
Factorization (NMF)
• One Class Support Vector
Machine (One-Class SVM)
• Orthogonal Partitionining
Clustering (O-Cluster oder
OC)
Unsupervised Funktionen
20
• DBMS_DATA_MINING
– Die Apply Prozedur erzeugt Tabelle mit Spalten, basierend auf den
verwendeten Algorithmus
• DBMS_DATA_MINING_TRANSFORM
– Mit der Stack Prozedur kann eine Transformationsliste erstellt und
dem Modell mitgegeben werden.
• DBMS_PREDICTIVE_ANALYTICSBein
Beinhaltet automatische Routinen für Predict, Explain und Profile
Operationen.
Vorhandene PL/SLQ Pakete
21
Administration - Data Mining Views
ALL_, DBA_ und USER_VIEWS:
• ALL_MINING_MODELS
• ALL_MINING_MODEL_ATTRIBUTES
• ALL_MINING_MODEL_SETTINGS
22
SQL Funktionen für Prognosen (Prediction)
PREDICTION
PREDICTION_BOUNDS (nur GLM)
PREDICTION_COST
PREDICTION_DETAILS
PREDICTION_PROBABILITY
PREDICTION_SET
Data Mining Funktionen sind SQL Operatoren, die für das Deployment der Mining Modelle gentutz werden.
SELECT cust_id FROM (SELECT cust_id FROM mining_data_apply_v WHERE
country_name = 'Italy' ORDER BY PREDICTION_PROBABILITY(DT_SH_Clas_sample, 1 USING *) DESC, cust_id)
WHERE rownum < 11;
23
Predictive Analytics
Ist ein „Verfahren“, die DM Prozesse in einfacher Art und Weise durchführt. Manchmal auch unter dem Begriff „One-Click“ - DM bekannt, setzt es keine Data Mining Kenntnisse voraus.
• Keine Mining Modelle notwendig.
• Kein Verständnis der Mining Funktionen notwendig.
• Kein Verständnis der Algortihmen notwendig.
24
Predictive Analytics - Operationen
Beispiel eines EXPLAIN„S
Operationen:
• EXPLAIN
• PREDICT
• PROFILE
API:
DBMS_PREDICTIVE_ANALYTICS
25
11g Statistiken & SQL Analytic(Free)
• Ranking functions– rank, dense_rank, cume_dist,
percent_rank, ntile
• Window Aggregate Funktionen (moving and cumulative)
–Avg, sum, min, max, count, variance, stddev, first_value, last_value
• LAG/LEAD Funktionen–Direct inter-row reference using offsets
• Reporting Aggregate Funktionen–Sum, avg, min, max, variance, stddev,
count, ratio_to_report
• Statistische Aggregationen–Correlation, linear regression family,
covariance
• Linear Regression–Fitting of an ordinary-least-squares
regression line to a set of number pairs.
–Frequently combined with the COVAR_POP, COVAR_SAMP, and CORR functions
Beschreibende Statistik– DBMS_STAT_FUNCS: summarizes
numerical columns of a table and returns count, min, max, range, mean, median, stats_mode, variance, standard deviation, quantile values, +/- n sigma values, top/bottom 5 values
• Korrelations– Pearson’s correlation coefficients, Spearman's
and Kendall's (both nonparametric).
• Cross Tabs– Enhanced with % statistics: chi squared, phi
coefficient, Cramer's V, contingency coefficient, Cohen's kappa
• Hypothetisches Testing– Student t-test , F-test, Binomial test, Wilcoxon
Signed Ranks test, Chi-square, Mann Whitney test, Kolmogorov-Smirnov test, One-way ANOVA
• Distribution Fitting– Kolmogorov-Smirnov Test, Anderson-Darling
Test, Chi-Squared Test, Normal, Uniform, Weibull, Exponential
Anmerkung Statistiken und SQL Analytics sind auch in der Oracle Database Standard Edition enthalten.
Statistics
26
Weiterführende Informationen
Oracle Data Mining
Oracle Data Mining BlogOracle Data Mining auf OTN