데이터 웨어하우스와 데이터 마이닝

Download Report

Transcript 데이터 웨어하우스와 데이터 마이닝

데이터 웨어하우스와
데이터마이닝
박 종수
컴퓨터정보학부
성신여자대학교
http://cs.sungshin.ac.kr/~jpark
데이터웨어하우스 구축 방법론

의사결정 지원 시스템의 발전과정

데이터웨어하우스 환경

데이터웨어하우스와 설계

데이터웨어하우스의 구체화 정도

데이터웨어하우스와 기술

KDD and Data Mining
[email protected]
2
의사결정지원 시스템의 발전과정
아키텍쳐 환경의 발전 단계
1) 1960년대



Master files, reports
Lots of master files
2) 1970년대


DASD (Direct Access Storage Device) & DBMS
Online, high-performance transaction processing (OLTP)
3) 1980년대


PCs, 4GL technology
Transaction processing & MIS/DSS
4) 1990년대

DM(Data Mining) & DW(Data Warehousing)
[email protected]
3
거미줄 구조 (The Spider Web)
[email protected]
4
4가지 수준의 아키텍쳐 환경

운영 수준(operational level)


원자 또는 데이터웨어하우스 수준 (atomic or DW level)


Most granular, time variant, integrated, subject oriented, some
summary
부서 수준(departmental level)


Detailed, day to day, current valued, high probability of access,
application oriented
Parochial, some derived; some primitive, typical
departments(accounting, marketing, actuarial)
개인 수준(individual level)

Temporary, ad hoc, heuristic, non-repetitive, PC or workstation
based
[email protected]
5
Levels of the Architecture
[email protected]
6
DW SDLC (시스템 개발 생명 주기)


1)
2)
3)
4)
5)
6)
7)
System development life cycle
CLDS(SDLC 의 반대)라고도 부른다.
Implement warehouse
Integrate data
Test for bias
Program against data
Design DSS system
Analyze results
Understand requirements
[email protected]
7
데이터웨어하우스의 환경

데이터웨어하우스란
관리자의 의사결정을 지원하기 위한
주제중심의(subject oriented),
통합된(integrated),
비휘발성의(nonvolatile),
시간변이적인(time variant)
데이터 집합이다.
[email protected]
8
데이터의 주제중심의 예
[email protected]
9
통합에 대한 문제
[email protected]
10
데이터의 비휘발성
[email protected]
11
데이터의 시간 변이
[email protected]
12
데이터웨어하우스의 구조
monthly sales
by product line
1981-1992
highly
summarized
Meta Data
lightly
summarized
(datamart)
weekly sales by
subproduct line
1984-1992
current
detail
operational
transformation
[email protected]
old
detail
sales detail
1990-1991
sales detail
1984-1989
13
데이터웨어하우스 구축과정


한번에 한 단계씩 설계되고 구축
점증적인 반복 과정을 통해 완성
①
②
③
④
첫째날: 운영 활동 처리를 위한 시스템들만 존재
둘째날: DW의 첫번째 주제영역에 대한 몇몇 테이블 생성
셋째날: 더 많은 DW들이 생성되고, 사용자들도 증가
네째날: DW가 점점 확산, DW는 분석적 처리를 위한 데이터 원
천으로 인식 시작
⑤ 다섯째날: 부서별 데이터베이스(데이터마트 또는 OLAP)가 활
성화
⑥ 여섯째날: 많은 부서별 시스템이 구축

N번째날: 아키텍쳐가 완성

몇 년은 일반적: 1일째부터 n일째까지의 이동 과정 동안
에 DSS 환경이 성숙되고 발전
[email protected]
14
데이터웨어하우스 구축과정(1일 – n일까지)
[email protected]
15
데이터웨어하우스 설계

Star Joins


Database 설계에서는 모든 entity는 같다고 가정
DW에서는 “entity는 결코 대등하지 않다”에서 출발
1) Fact table



대량의 데이터를 포함하는 entity
Join의 중심
주위의 테이블을 참조할 수 있는 외래키(foreign key)를 가짐
2) Dimension tables


주위의 엔터티들(테이블들)
스타 조인 생성의 이점


DSS 처리 과정에서 데이터를 능률적으로 처리
데이터를 미리 연결하고 선택적으로 중복 데이터를 생성하여
데이터 액세스와 분석을 더욱 간단하고 효율적으로 할 수 있게
함
[email protected]
16
KDD

Knowledge Discovery in Database


데이터베이스에서 지식 탐사는 데이터에서 유효하고, 귀하고,
잠재적으로 유용하고, 궁극적으로 이해될 수 있는 패턴을 알아
내는 쉽지않은 과정이다.
전체 KDD 과정
①
②
③
④
⑤
⑥
⑦
⑧
데이터 마이닝 과정의 적용 영역과 목표의 이해를 밝힘
목적 데이터 집합 (target data set)을 선택하거나 얻음
데이터 청소, 사전처리, 그리고 변환
모델 개발과 가설 설정
적절한 데이터 마이닝 알고리즘의 선택
결과 해석 및 시각화
결과 검사 및 검증
발견된 지식을 사용하고 관리
[email protected]
17
Overview of the steps constituting the KDD process
Data
Selection
Preprocessing
Target Data
Preprocessed
Data
Transformation
Transformed
Data
Data
Mining
Patterns
Interpretation/
Evaluation
Knowledge
[email protected]
18
Data Mining



관찰된 데이터로 부터 패턴이나 모델의 추출
KDD에서 한 단계
데이터 마이닝 작업(Data Mining Tasks)








Data Processing
Prediction
Regression
Classification
Clustering
Link Analysis (Associations)
Model Visualization
Exploratory Data Analysis (EDA)
[email protected]
19
Types of Data-Mining Problems

Prediction



Classification
Regression
Time Series

Knowledge Discovery







[email protected]
Deviation Detection
Database Segmentation
Clustering
Association Rules
Summarization
Visualization
Text mining
20
Association Rule
Ex: the statement that 90% of transactions that purchase
bread and butter also purchase milk.
[Bread], [Butter]
[Milk] (12.5%, 90%)
antecedent
consequent
90% : confidence factor of the rule (not 100%)
12.5%: support for the rule,
the fraction of transactions in database
Find all rules that have “Diet Coke” as consequent.
Find all rules that have “bagels” in the antecedent.
Find the “best” k rules that have “bagels” in the consequent.
[email protected]
21
연관규칙의 정의

I : a set of literals called items.
T: a set of items such that T  I, transaction.

An association rule is an implication of the form
X  Y, where X  I, Y  I and X Y = ø.

X  Y [support, confidence]
# of transacti ons containing all the items in X  Y
support 
total # of transacti ons in the database
# of transacti ons that contain both X and Y
confidence 
# of transacti ons contaning X
[email protected]
22
Generalized Association Rules


Finding associations between items at any level of the taxonomy.
Rules:



People who buy clothes tend to buy shoes. (  )
People who buy outerwear tend to buy shoes. ( o )
People who buy jacket tend to buy shoes. (  )
Clothes
Outerwear
Jackets
[email protected]
Footwear
Shirts
Shoes
Hiking Boots
Ski Pants
23
Cyclic Association Rules



Beer and chips are sold together primarily
between 6PM and 9PM.
Association rules could also display regular
hourly, daily, weekly, etc., variation that has the
appearance of cycles.
An association rule X  Y holds in time unit ti,




if the support of X  Y in D[i] exceeds MinSup and
the confidence of X  Y in D[i] exceeds MinConf.
It has a cycle c = (l, o), a length l and an offset o.
“coffee  doughnuts” has a cycle (24, 7),

if the unit of time is an hour and “coffee  doughnuts” holds
during the interval 7AM-8AM everyday (I.e., every 24 hours).
[email protected]
24
When is Market Basket Analysis useful?

The following three rules are examples of real
rules generated from real data:

On Thursdays, grocery store consumers often
purchase diapers and beer together.


Customers who purchases maintenance agreements
are very likely to purchase large appliances.


Useful rule: high quality, actionable information.
Trivial rule
When a new hardware store opens, one of the most
commonly sold items is toilet rings.

Inexplicable rule
[email protected]
25
Sequential Patterns

Examples of patterns:







Customers typically rent “Star Wars”, then “Empire
Strikes Back”, and then “Return of the jedi”.
Note that these rentals need not to be consecutive.
수강신청: 관광과 여가(1학기) 수도권과 주택문제
(2학기)  증권시장(3학기)
주가 변동 패턴: 삼성전자 주가 상승  LG전자 주
가 상승  보해양조 주가 상승
구매패턴: 양복  와이셔츠  검정색 구두  ?
의료진단에서 질병 발생 순서 패턴
환자 치료에서 진료 및 투약 패턴
[email protected]
26
Mining Path Traversal Patterns


Understanding user access patterns in a
distributed information providing environment
such as WWW, Hitel, etc.

help improving the system design

lead to better marketing decisions
Capturing user access patterns

mining path traversal patterns

capturing user traveling behavior

improving the quality of such services
[email protected]
27
Traversal patterns
1
2
A
12
B
13
6
3
C
O
15
14
5
E
11
7
U
V
4
D
8
G
10
9
H
Maximal forward references
{ABCD, ABEGH, ABEGW, AOU, AOV}
W
1. Find large reference sequences.
2. Find maximal reference sequences.
[email protected]
28