rptree code analytics(3)
DESCRIPTION
RPTree code analytics(3). Jeonbuk National Univ. Database Laboratory Kim Tae Hoon. Contents. Update_thresh Update_thresh 예제 소스 Update_thresh 수행 예제 Classify Classify 예제 소스 Classify 수행 예 Classify 데이터 파라메터 설정 Classify 그루핑 및 분리된 데이터 분포 확인. double update_thresh. 파라메 터 - PowerPoint PPT PresentationTRANSCRIPT
Copyright©2013.02.18 JBNU Database Laboratory All Right reserved.
RPTree code analytics(3)
Jeonbuk National Univ.
Database Laboratory
Kim Tae Hoon
2/14
Contents
• Update_thresh• Update_thresh 예제 소스• Update_thresh 수행 예제
• Classify• Classify 예제 소스• Classify 수행 예• Classify 데이터 파라메터 설정• Classify 그루핑 및 분리된 데이터 분포 확인
3/14
double update_thresh• 파라메터
• RPNode* n : 어떤 ndx 에 해당하는 RPNode• const int proj_num : (n = 0, 1, 2, … n : NUM_PROJ)
• 함수 역활 • 점들 사이에 따른 분할 기준 거리 중 평균치인 최대치 maxx 값 반환
• 변수 • P1, P2 : LargeBin, SmallBin 연산 결과 누적 저장• M1, M2 : bin_mean 과 LargeBin, SmallBin 의 곱 연산 결과 누적 저장• Threshold : 점들의 분할 경계 지점의 임계치를 저장• Tmp : 해당 노드에서 점들 사이에 따른 평균 분할 기준 거리 계산 결과 업데이트
4/14
update_thresh 예제 소스 (536~576)
5/14
update_thresh 수행 예제 P1, P2Bin Index 범위
For Index 범위
6/14
update_thresh 수행 예제 M1, M2
mean
stddev LargeBin index 짝수일 경우 M1+=LargeBin index 홀수일 경우 M2+=
7/14
update_thresh 수행 예제 M1, M2
• 파랑 셀일 경우 M1• 초록 셀일 경우 M2
8/14
update_thresh tmp 예제
9/14
update_thresh tmp, threshold 예제
/14
unsigned int classify(283~312)• 파라메터
• RPNode* n : 어떤 ndx 에 해당하는 RPNode• t_data* data : sin3d.data 파일
• 함수 역활 • RPTree 가 구성된 트리 정보를 비트맵 으로 나타탬 • 출력을 비트맵 형식으로 나타내며 이를 integer 로 반환
• 변수 • bit_mask : 비트 마스크 연산을 위한 변수• Path_To_take : 비트 마스크 연산 후 지나간 path 리턴
10
11/14
Classify 예제 소스
12/14
Classify 수행 예제 • 반환된 값이 4 일 때
• 비트맵 : 0100
• BITMAP = 4 Shift
0010
• BITMAP = 2
0100PTH += 4
Shift
PTH += 6
• 반환된 값이 2 일 때• 비트맵 : 0010
return
1 레벨
2 레벨
3 레벨
13/14
데이터 파라메터 설정• 원본 데이터 10000 개총 1000 개의 DATA 택
• VECT_LEN 3• 10 개의 PROJ_NUM• MAX_TREE_DEPTH 4
14/14
Classify 데이터 분포
비트맵 set 그루핑
Sin3d.cls-