Download dmuser1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
ORACLE Data Mining
 Included with ORACLE 10g
 Freely available for UVic and for personal
unlimited evaluation use.
Choose the
enterprise
version!
1
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 dmpsw
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED on users;
 Then, grant privileges to this user:









GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
create procedure to DMUSER1;
create session to DMUSER1;
create table to DMUSER1;
create sequence to DMUSER1;
Now, DMUSER1
create view to DMUSER1;
is ready to
create job to DMUSER1;
perform data
create type to DMUSER1;
mining tasks.
create synonym to DMUSER1;
execute on ctxsys.ctx_ddl to DMUSER1;
2
‘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.
3
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
GRANT SELECT
GRANT SELECT
GRANT SELECT
dmuser1;
 GRANT SELECT




ON
ON
ON
ON
customers TO dmuser1;
sales TO dmuser1;
products TO dmuser1;
supplementary_demographics TO
ON countries TO dmuser1;
 Now, dmuser1 is able to execute SELECT on these tables,
and create views on them.
4
DMUSER1: Creating views on
‘sh’ data
CREATE VIEW mining_data_build_v AS
SELECT
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_KANJI
FROM sh.customers a, sh.supplementary_demographics b, sh.countries c
WHERE 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.
5
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.
6
Connecting
7
The Problem
 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.
8
Structure
9
A fragment of data
10
Getting a feeling about the data
11
Build a classifier I
12
Build a classifier II
13
Build a classifier III
14
Build a classifier IV
I am
selecting
this
15
Build a classifier V
16
Build a classifier VI
17
Build a classifier VII
18
Build a classifier VIII
P(A=1|…) will be
used for sorting
tuples, as opposed to
P(A=0|…).
19
Build a classifier IX
20
Build a classifier X
21