15
RPTree 코코코코 2013.02.04( 코 ) DBLAB 코코코

RPTree 코드분석

Embed Size (px)

DESCRIPTION

RPTree 코드분석. 2013.02.04( 월 ) DBLAB 김태훈. Past work. learn.c RPtree generateUniform 예제 learnRPtree.c Projection computation RPNode structure learnRPnode : alpha 가중치 계산 Mean 계산. Contents. learnRPTree.c Mean 값 계산 방법 , 예제 Update_stats Mean 값 계산 Update_hist 평균 , 표준편차 계산 - PowerPoint PPT Presentation

Citation preview

RPTree 코드분석

2013.02.04( 월 )DBLAB 김태훈

Past work

• learn.c • RPtree • generateUniform 예제

• learnRPtree.c • Projection computation• RPNode structure• learnRPnode : alpha 가중치 계산• Mean 계산

2

Contents

• learnRPTree.c• Mean 값 계산 방법 , 예제• Update_stats Mean 값 계산• Update_hist

평균 , 표준편차 계산 표준편차 계산 목적 LargeBin, SmallBin Update 편차간 거리에 따른 LargeBin, SmallBin 분류 LargeBin SmallBin Update 예제 및 출력

3

4

learnRPTree.c - mean update

n->mean[i] = (1-alpha)*(n->mean[i])+data[i]*alpha;• Data 의 모든 평균을 점화식으로 계산

5

learnRPTree.c – mean 계산 ( 점화식 )

mean[i] = (1-alpha)*mean[i]+data[i]*alpha;

6

learnRPTree.c - Update_stats Mean 계속

상위 mean 값과 마찬가지로 식이 동일하며 평균을 계산

7

learnRPTree.c - Update_stats Mean

점화식을 이용 , 평균을 구하는 식

8

learnRPTree.c - Update_stats 예제

9

learnRPTree.c - Update_hist 계속 1

투영된 (proj_data) 데이터 평균과 표준 편차를 이용

LargeBin 과 SmallBin 의 가중치 업데이트

10

learnRPTree.c – Update_hist 계속 2

표준편차 계산

11

learnRPTree.c – 표준편차의 계산 목적

각 데이터의 분포의 거리의 차이를 비교해서 자료들의 밀집여부를 봄

평균

표준편차

12

learnRPTree.c – Update_hist 계속 3

Smallbin 과 LargeBin

업데이트

13

learnRPTree.c – Update_hist 계속 4

편차간 거리에 따라 alpha 값이 재 계산

14

learnRPTree.c – Update_hist 계산 예제

15

learnRPTree.c – Update_hist 출력

1412 개의 ndx0 데이터 설정 파라메터

• #define VECT_LEN 2• #define MAX_TREE_DEPTH 3• #define NUM_PROJ 2• #define DECAY_COUNT 65536• #define N1 50• #define N2 50• #define N3 250• tree->projections[0][0] = 0.3652;• tree->projections[0][1] = -0.6376;• tree->projections[1][0] = 0.5000;• tree->projections[1][1] = 0.5000;

ndx : 0