Top Banner
1 ORACLE Data Mining Included with ORACLE 10g Freely available for UVic and for personal unlimited evaluation use. Choose the enterprise version!
21

ORACLE Data Mining

Jan 19, 2016

Download

Documents

alva

ORACLE Data Mining. Included with ORACLE 10g Freely available for UVic and for personal unlimited evaluation use. Choose the enterprise version!. Creating a data mining user. A data mining user is a canonical user, but with a few more privileges than usual. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ORACLE Data Mining

1

ORACLE Data Mining Included with ORACLE 10g Freely available for UVic and for

personal unlimited evaluation use.

Choose the enterprise version!

Page 2: ORACLE Data Mining

2

Creating a data mining user A data mining user is a canonical user, but with a few

more privileges than usual. As ‘system’ create a canonical user:

CREATE USER dmuser1 IDENTIFIED BY dmpswDEFAULT TABLESPACE usersTEMPORARY TABLESPACE tempQUOTA UNLIMITED on users;

Then, grant privileges to this user: GRANT create procedure to DMUSER1; GRANT create session to DMUSER1; GRANT create table to DMUSER1; GRANT create sequence to DMUSER1; GRANT create view to DMUSER1; GRANT create job to DMUSER1; GRANT create type to DMUSER1; GRANT create synonym to DMUSER1; GRANT execute on ctxsys.ctx_ddl to DMUSER1;

Now, DMUSER1 is ready to perform data mining tasks.

Page 3: ORACLE Data Mining

3

‘sh’ user To use the examples

you have to activate the sh user. There are the

example data

Created during ORACLE installation.

However, it’s not active.

To activate: Open Oracle Enterprise Manager. Login as ‘system’. Go to ‘administration’ tab, then click on users, find the ‘sh’ user and activate it.

Page 4: ORACLE Data Mining

4

Using the data of ‘sh’ Connect (login) as sh and grant SELECT privilege to

dmuser1 for these tables: COUNTRIES CUSTOMERS PRODUCTS SUPPLEMENTARY_DEMOGRAPHICS SALES

In other words execute: GRANT SELECT ON customers TO dmuser1; GRANT SELECT ON sales TO dmuser1; GRANT SELECT ON products TO dmuser1; GRANT SELECT ON supplementary_demographics TO

dmuser1; GRANT SELECT ON countries TO dmuser1;

Now, dmuser1 is able to execute SELECT on these tables, and create views on them.

Page 5: ORACLE Data Mining

5

DMUSER1: Creating views on ‘sh’ data

CREATE VIEW mining_data_build_v ASSELECT a.CUST_ID, a.CUST_GENDER, 2003-a.CUST_YEAR_OF_BIRTH AGE, a.CUST_MARITAL_STATUS, c.COUNTRY_NAME,

a.CUST_INCOME_LEVEL, b.EDUCATION, b.OCCUPATION, b.HOUSEHOLD_SIZE, b.YRS_RESIDENCE, b.AFFINITY_CARD, b.BULK_PACK_DISKETTES, b.FLAT_PANEL_MONITOR, b.HOME_THEATER_PACKAGE, b.BOOKKEEPING_APPLICATION, b.PRINTER_SUPPLIES, b.Y_BOX_GAMES, b.OS_DOC_SET_KANJIFROM sh.customers a, sh.supplementary_demographics b,

sh.countries cWHERE a.CUST_ID = b.CUST_ID AND a.country_id = c.country_id AND a.cust_id between 101501 and 103000;

You can find other view creation statements in dmsh.sql that will be in the web.

Page 6: ORACLE Data Mining

6

Oracle Data Miner GUI It’s a Java application. Connects through JDBC to the ORACLE database. Installed in SENG Windows lab. Can also be freely downloaded from Oracle.

Page 7: ORACLE Data Mining

7

Connecting

Page 8: ORACLE Data Mining

8

An electronics store chain wants to distribute a discount card to its customers, but only to those customers who are expected to increase their buying (and thus the company’s revenue) because of this card.

A test campaign was run on a sample of customers and the results were compiled into a table containing the customer demographics, purchasing patterns, and a measure of revenue produced by each customer.

The Problem

Page 9: ORACLE Data Mining

9

Structure

Page 10: ORACLE Data Mining

10

A fragment of data

Page 11: ORACLE Data Mining

11

Getting a feeling about the data

Page 12: ORACLE Data Mining

12

Build a classifier I

Page 13: ORACLE Data Mining

13

Build a classifier II

Page 14: ORACLE Data Mining

14

Build a classifier III

Page 15: ORACLE Data Mining

15

Build a classifier IV

I am selecting

this

Page 16: ORACLE Data Mining

16

Build a classifier V

Page 17: ORACLE Data Mining

17

Build a classifier VI

Page 18: ORACLE Data Mining

18

Build a classifier VII

Page 19: ORACLE Data Mining

19

Build a classifier VIII

P(A=1|…) will be used for sorting

tuples, as opposed to P(A=0|…).

Page 20: ORACLE Data Mining

20

Build a classifier IX

Page 21: ORACLE Data Mining

21

Build a classifier X