HOL: Learn to use SQL Developer's Oracle Data Miner Workflow UI Move the Algorithms; Not the Data!

Charlie Berger Sr. Director Product Management, , AI and Cognitive Analytics, [email protected] www.twitter.com/CharlieDataMine Brendan Tierney, President, Oralytics, Author multiple books, [email protected] Tim Vlamis, VP Analytics, Vlamis Software, [email protected] Dhvani Sheth, Senior Solution Engineer, [email protected] Siddesh C Prabhu Dev Ujjni, Staff Solution Engineer, [email protected] Copyright © 2020 Oracle and/or its affiliates. Safe harbor statement

The following 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, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of .

Copyright © 2020 Oracle and/or its affiliates. d

Oracle Machine Learning OML4SQL OML Notebooks SQL API with Apache Zeppelin on Autonomous Database OML4R Oracle Data Miner API Oracle SQL Developer extension

OML4Py* OML4Spark Python API R API on Big Data

OML Microservices* Model Deployment and Management, Cognitive Image and Text

Copyright © 2020 Oracle and/or its affiliates. * Coming soon What is Machine Learning? Algorithms automatically sift through large amounts of data to discover hidden patterns, new insights and make predictions

Identify most important factor (Attribute Importance) A1A2 A3A4 A5 A6 A7 Predict customer behavior (Classification) Find profiles of targeted people or items (Classification)

Supervised Learning Predict or estimate a value (Regression)

Segment a population (Clustering)

X2 Find fraudulent or “rare events” ()

X1

Determine co-occurring items in a “basket” (Associations) Unsupervised Learning Copyright © 2020 Oracle and/or its affiliates. 5 HOL: SQLDEV’s Oracle Data Miner UI

1.Quick Oracle Data Miner Demo 2.HOL Env. 19c Cloud Using SQL Developer 19.4 with Oracle Data Miner UI add-in enabled 3.Try to do 3-5 Oracle Data Miner Tutorials See bookmark: https://apexapps.oracle.com/pls/apex/f?p=44785:50:110687246573848:::50:P50_COURSE_ID,P50_EVENT_ID:457,6310 Start with “Using Oracle Data Miner 19.4” Instructors will walk around helping to answer ML questions and help

Copyright © 2020 Oracle and/or its affiliates. Oracle Machine Learning Algorithms

CLASSIFICATION REGRESSION FEATURE EXTRACTION Naïve Bayes Linear Model Principal Comp Analysis (PCA) (GLM) Generalized Linear Model Non-negative Matrix Factorization Decision Tree Support Vector Machine (SVM) Singular Value Decomposition (SVD) Random Forest Stepwise Linear regression Explicit Semantic Analysis (ESA) Neural Network Neural Network Support Vector Machine LASSO TEXT MINING SUPPORT Explicit Semantic Analysis Algorithms support text ATTRIBUTE IMPORTANCE A1 A2 A3 A4 A5 A6 A7 Tokenization and theme extraction CLUSTERING Minimum Description Length Explicit Semantic Analysis (ESA) for Hierarchical K-Means Principal Comp Analysis (PCA) document similarity Hierarchical O-Cluster Unsupervised Pair-wise KL Div Expectation Maximization (EM) CUR decomposition for row & AI STATISTICAL FUNCTIONS X2 Basic statistics: min, max, ANOMALY DETECTION ASSOCIATION RULES median, stdev, t-test, F-test, Pearson’s, One-Class SVM X1 A priori/ market basket Chi-Sq, ANOVA, etc. PREDICTIVE QUERIES R & PYTHON * Coming soon TIME SERIES Predict, cluster, detect, features Third-party R & Python Packages Forecasting - Exponential Smoothing through Embedded Execution Includes popular models SQL ANALYTICS Spark MLlib algorithm integration e.g. Holt-Winters with trends, SQL Windows seasonality, irregularity, missing data SQL Patterns MODEL DEPLOYMENT & SQL Aggregates MONITORING * Coming soon • Includes support for Partitioned Models, Transactional data and SQL—1st Class Objects aggregations, Unstructured data, Geo-spatial data, Graph data. etc, Oracle RESTful API (ORDS) Copyright © 2020 Oracle and/or its affiliates. OML Microservices (for Apps) OML for SQL Model Build & SQL Simple SQL Syntax—Classification Model ML Model Build (PL/SQL) BEGIN DBMS_DATA_MINING.CREATE_MODEL( model_name => 'BUY_INSUR1', mining_function => dbms_data_mining.classification, data_table_name => 'CUST_INSUR_LTV', case_id_column_name => 'CUST_ID', target_column_name => 'BUY_INSURANCE', settings_table_name => 'CUST_INSUR_LTV_SET'); END; /

Model Apply (SQL query) Select prediction_probability(BUY_INSUR1, 'Yes' USING 3500 as bank_funds, 825 as checking_amount, 400 as credit_balance, 22 as age, 'Married' as marital_status, 93 as MONEY_MONTLY_OVERDRAWN, 1 as house_ownership) from dual;

Copyright © 2020 Oracle and/or its affiliates. Oracle Data Miner UI Easy to Use Drag & Drop UI for SQL data professionals & Citizen Data Scientists • Easy to use to define analytical methodologies that can be shared • SQL Developer Extension • Workflow API and generates SQL code for immediate deployment

Copyright © 2020 Oracle and/or its affiliates. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 9 Oracle Data Miner HOL Environment and Setup

Copyright © 2020 Oracle and/or its affiliates. 12

2 Launch Oracle Learning Library for Oracle Data Miner…

1 Launch SQL Developer with Oracle Data Miner UI

Copyright © 2020 Oracle and/or its affiliates. Oracle Confidential – Internal/Restricted/Highly Restricted 13

Copyright © 2020 Oracle and/or its affiliates. Oracle Confidential – Internal/Restricted/Highly Restricted 1 Click View to launch Data Miner UI

Copyright © 2020 Oracle and/or its affiliates. 15

1 Connections, 4 Components Projects & (Nodes) Workflows

2 Workflow Editor 3 Properties

Copyright © 2020 Oracle and/or its affiliates. 16

1 Launch Firefox to access the Oracle Data Miner Oracle Learning Libraries

Copyright © 2020 Oracle and/or its affiliates. Oracle Confidential – Internal/Restricted/Highly Restricted P Done!

Start here doing these Learning Paths

Copyright © 2019 Oracle and/or its affiliates.Copyright © 2020 Oracle and/or its affiliates. 1 Scroll down to see rest of tutorial

Copyright © 2020 Oracle and/or its affiliates. 1 Keep following along the tutorial until you complete it.

Copyright © 2019 Oracle and/or its affiliates. Copyright © 2020 Oracle and/or its affiliates. 1 Keep following along the tutorial until you complete it.

Copyright © 2019 Oracle and/or its affiliates. Copyright © 2020 Oracle and/or its affiliates. 1 To continue, click the arrow in the green banner

Copyright © 2019Copyright Oracle and/or © 2020 its affiliates. Oracle and/or its affiliates. Copyright © 2020 Oracle and/or its affiliates. 1 Keep following along the tutorial until you complete it.

Copyright © 2019 Oracle and/or its affiliates. Copyright © 2020 Oracle and/or its affiliates. 1 Keep following along the tutorial until you complete it.

Copyright © 2019 Oracle and/or its affiliates. Copyright © 2020 Oracle and/or its affiliates. 1 To continue, click the arrow in the green banner

Copyright © 2019 Oracle and/or its affiliates. Copyright © 2020 Oracle and/or its affiliates. How to Find the OLL Tutorials (if you get lost)

1 Google Oracle Learning Library

2 Search for machine learning

Copyright © 2020 Oracle and/or its affiliates. Sharing Insights and Predictions

APEX and OAC

Copyright © 2020 Oracle and/or its affiliates. Oracle Data Miner UI: Insights and Predictions Oracle Data Miner UI: Insights and Predictions

Step 1. “Citizen Data Scientist” builds, tests, applies ML methodologies using ODMr

Step 2.  OAC Data Analyst does further exploratory analysis using OML’s insights & predictions

Copyright © 2020 Oracle and/or its affiliates. 29 Deployment using APEX Apply the Models to Predict “Best Wines”

Oracle APEX to query and Predictions distribute insights and predictions

Copyright © 2020 Oracle and/or its affiliates. 30 Deployment using Analytics Cloud Apply the Models to Predict “Best Wines”

Oracle Analytics Predictions, Probabilities and Explanations Cloud for interactive “analytical” dashboards to investigate insights and predictions

* Oracle Analytics Cloud screen from “Predicting a Good Wine” by

Copyright © 2020 Oracle and/or its affiliates. Francesco Tisiot, Rittman Mead and Charlie Berger, Oracle Optional

OML4SQL Sample Programs

Copyright © 2020 Oracle and/or its affiliates. OML4SQL Sample Programs Starter SQL and PL/SQL Scripts for Learning and Fast-Starts

Oracle Database PL/SQL Packages and Types Reference for syntax of the PL/SQL API Oracle Application Developer's Guide is a Virtual Book with links for information on the use of the Oracle Database SQL Language Reference for syntax of the SQL functions for model scoring

Copyright © 2020 Oracle and/or its affiliates. Oracle Data Mining SQL Sample Programs Directory Listing of the Data Mining Sample Programs dmaidemo. dmsvrdem.sql dmshgrants.sql dmkmdemo.sql dmdtxvlddemo.sql dmglrdem.sql dmsvddemo.sql dmocdemo.sql dmstardemo.sql dmardemo.sql dmtxtnmf.sql dmhpdemo.sql dmnbdemo.sql dmemdemo.sql dmsvcdem.sql dmsvodem.sql dmsh.sql dmdtdemo.sql dmtxtsvm.sql dmnmdemo.sql dmglcdem.sql

Copyright © 2020 Oracle and/or its affiliates. Oracle Data Mining SQL Sample Programs dmdtdemo.sql –DBMS_DATA_MINING package – Decision Tree

-- Given demographic data about a set of customers, predict the -- customer response to an affinity card program using a classifier -- based on Decision Trees algorithm.

-- CREATE A NEW MODEL -- -- Build a DT model

BEGIN DBMS_DATA_MINING.CREATE_MODEL( model_name => 'DT_SH_Clas_sample', mining_function => dbms_data_mining.classification, data_table_name => 'mining_data_build_v', case_id_column_name => 'cust_id', target_column_name => 'affinity_card', settings_table_name => 'dt_sh_sample_settings'); END; /

SELECT T.cust_id, S.prediction, S.probability, S.cost FROM (SELECT cust_id, PREDICTION_SET(dt_sh_clas_sample COST MODEL USING *) pset FROM mining_data_apply_v WHERE cust_id < 100011) T, TABLE(T.pset) S ORDER BY cust_id, S.prediction;

Copyright © 2020 Oracle and/or its affiliates. https://github.com/oracle/oracle-db-examples/tree/master/machine-learning Congratulations!

Data Scientist

Copyright © 2020 Oracle and/or its affiliates. For More Information

Google: Oracle Machine Learning on OTN

Copyright © 2019Copyright Oracle and/or© 2020 its Oracle affiliates. and/or its affiliates. 37 Try Oracle Database 19c + Oracle Data Miner for FREE! 1 Navigate to https://www.oracle.com/webfolder/technetwork/tutorials/i nfographics/dbcs_trial_quickview/index.html 2 Sign up for a Free Oracle Database Trial

3

Download SQL Developer and Configure Oracle Data Miner

Copyright © 2020 Oracle and/or its affiliates. Thank You

Charlie Berger, [email protected] Brendan Tierney, [email protected] Tim Vlamis, [email protected] Dhvani Sheth, [email protected] Siddesh C Prabhu Dev Ujjni, [email protected]

Copyright © 2020 Oracle and/or its affiliates.