Download presentation
Presentation is loading. Please wait.
1
UF NNC Ptree Ex. 1 using 0-D Ptrees (sequences) a=a5 a6 a1’a2’a3’a4’=(000000)
Vote histogram (so far) Identifying all training tuples in the distance=0 ring or 0ring, centered at a (exact matches ) as 1-bits of the Ptree, P= a5^a6^a1’^a2’^a3’^a4’ (we use _ for complement) There are no training points in a’s 0ring! We must look further out, i.e., a’s 1ring a4‘ 1 a3‘ 1 a2‘ 1 a1‘ 1 a6 1 a5 1 P d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a1 1 a2 1 a3 1 a4 1 a5 1 a6 1 a7 1 a8 1 a9 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1 a5‘ 1 a6‘ 1 a7‘ 1 a8‘ 1 a9‘ 1 C' 1
2
UF NNC Ptree ex-1 (cont.) a’s 1ring? a=a5 a6 a1’a2’a3’a4’ = (000000)
(001000) (100000) (000100) (000010) (000001) (010000) Training pts in the 1ring centered at a are given by 1-bits in the Ptree, P, constructed as follows: a5^a6^a1’^a2’^a3’^a4’ a5^a6^a1’^a2’^a3’^a4’ a5^a6^a1’^a2’^a3’^a4’ a5^a6^a1’^a2’^a3’^a4’ a5^a6^a1’^a2’^a3’^a4’ a5^a6^a1’^a2’^a3’^a4’ a4‘ 1 a4‘ 1 a4‘ 1 a4‘ 1 a4‘ 1 a4‘ 0 0 1 The C=1 vote count = root count of P^C. a3‘ 1 a3‘ 1 a3‘ 1 a3‘ 1 a3‘ 1 0 1 a3‘ 1 a2‘ 1 a2‘ 1 a2‘ 1 a2‘ 1 1 1 a2‘ 1 a2‘ 1 The C=0 vote count = root count of P^C. (never need to know which tuples voted) a1‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 C 1 a6 1 a6 0 0 1 a6 1 a6 1 a6 1 a6 1 C 1 a5 1 a5 1 a5 1 a5 1 a5 1 a5 1 P 1 d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a1 1 a2 1 a3 1 a4 1 a5 1 a6 1 a7 1 a8 1 a9 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1 a5‘ 1 a6‘ 1 a7‘ 1 a8‘ 1 a9‘ 1 C' 1 OR
3
a’s 2-ring? a=a5 a6 a1’a2’a3’a4’ = (000000)
(101000) (100100) (100001) (110000) (100010) For each of the following Ptrees, a 1-bit corresponds to a training point in a’s 2-ring: Pa5a6a1’a2‘a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2‘a3‘a4’ st line first: a4‘ 1 a4‘ 1 a4‘ 1 a4‘ 1 a4‘ 0 0 1 a3‘ 1 a3‘ 1 a3‘ 1 a3‘ 1 0 1 a3‘ 1 Stop here? But the other 10 Ptrees should also be considered. The fact that the 2-ring includes so many new training points is “The curse of demensionality”. a2‘ 1 a2‘ 1 a2‘ 1 1 1 a2‘ 1 a2‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a6 0 0 1 a6 1 a6 1 a6 1 a6 1 a5 1 a5 1 a5 1 a5 1 a5 1 d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a5 1 a6 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1
4
Enfranchising the rest of a’s 2-ring? a=a5 a6 a1’a2’a3’a4’ = (000000)
For each of the following Ptrees, a 1-bit corresponds to a training point in a’s 2-ring: Pa5a6a1’a2‘a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2‘a3‘a4’ nd line: a4‘ 1 a4‘ 1 a4‘ 1 a4‘ 1 a3‘ 1 a3‘ 1 a3‘ 1 a3‘ 1 a2‘ 1 a2‘ 1 a2‘ 1 a2‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a6 0 0 1 a6 0 0 1 a6 0 0 1 a6 0 0 1 a5 1 a5 1 a5 1 a5 1 d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a5 1 a6 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1
5
Enfranchising the rest of a’s 2-ring (cont
Enfranchising the rest of a’s 2-ring (cont.) a=a5 a6 a1’a2’a3’a4’ = (000000) For each of the following Ptrees, a 1-bit corresponds to a training point in a’s 2-ring: Pa5a6a1’a2‘a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2’a3‘a4‘ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2‘a3’a4‘ Pa5a6 a1‘a2‘a3‘a4’ Pa5a6 a1‘a2‘a3‘a4’ rd line: a4‘ 1 a4‘ 1 a4‘ 1 a3‘ 1 a3‘ 1 a3‘ 1 a2‘ 1 a2‘ 1 a2‘ 1 a1‘ 1 a1‘ 1 a1‘ 1 a6 1 a6 1 a6 1 a5 1 a5 1 a5 1 d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a5 1 a6 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1
6
PNNC vote = 1/(1/d) 0-ring at a3‘ 1 Weights: 2 12 2 6 24 1 a5 1 d1 d2
d(p,q) = {wi : p & q differ at i; i in the relevant_attribute_set} One way to address the curse of dimensionality is to require that all relevant attribute weights be different (except for small groups (3?) of equally weighted attributes, and that the next weight always be larger than the previous weight-sum. Pts in the 47-disk, each Gets at least a vote of 1/12 Pts in the 47-disk, each Gets at least a vote of 1/24 Pts in the 47-disk, each Gets at least a vote of 1/48 a3‘ 1 Weights: 2 12 2 6 24 1 a5 1 d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a1 1 a2 1 a3 1 a4 1 a5 1 a6 1 a7 1 a8 1 a9 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1 a5‘ 1 a6‘ 1 a7‘ 1 a8‘ 1 a9‘ 1 C' 1 a7‘ 1 Vote Weight .02 .12 .06 Vote Weight .02 .06 Vote Weight .02 0-ring at
7
PNNC using weights (about the only way to address the curse of dimensionality)
“Gaussian” type of vote weighting = 1/e-dis2 d(p,q) = {weighti : p & q differ at i} a4‘ 1 a3‘ 1 a2‘ 1 a1‘ 1 a6 1 a5 1 P d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a1 1 a2 1 a3 1 a4 1 a5 1 a6 1 a7 1 a8 1 a9 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1 a5‘ 1 a6‘ 1 a7‘ 1 a8‘ 1 a9‘ 1 C' 1
8
a’s 1ring? a=a5 a6 a1’a2’a3’a4’ = (010010)
(000010) (110010) attribute weights (1, 1, 3, 3, 3, 3) vote weight = 1/(1+distance) d(p,q) = {weighti : p & q differ at i} a4‘ 1 a4‘ 1 a3‘ 1 a3‘ 1 a2‘ 1 a2‘ 1 a1‘ 1 a1‘ 1 a6 1 a6 1 a5 1 a5 1 P d1 d2 t1 t2 t1 t3 t1 t5 t1 t6 t2 t1 t2 t7 t3 t1 t3 t2 t3 t3 t3 t5 t5 t1 t5 t3 t5 t5 t5 t7 t6 t1 t7 t2 t7 t5 a1 1 a2 1 a3 1 a4 1 a5 1 a6 1 a7 1 a8 1 a9 1 C 1 a1‘ 1 a2‘ 1 a3‘ 1 a4‘ 1 a5‘ 1 a6‘ 1 a7‘ 1 a8‘ 1 a9‘ 1 C' 1
9
a’s 2ring? a=a5 a6 a1’a2’a3’a4’ = (010010)
(100010) Distance fctn: d(p,q) = {weighti : p & q differ at i} vote function: vote = 1/(1+distance) a4‘ 1 a3‘ 1 a2‘ 1 a1‘ 1 a6 1 a5 1 P d1 d2 t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5 1
13
Appendix: Comprehensive Attribute types example
R( a0, a1, a2, a3, a4, a5, B6,B7, C8,C9,C) Class Label Bit-maps for categorical values from, possibly several, flat categorical attributes. Numeric attributes: domains {0..7},{0..3} Hierarchical categorical (e.g., leaf_weights; inode_weights=sums) C C9 dairy sundries / | \ / | \ milk egg butter crafts knits toys / \ needles pins 3 5 1 1 1 1 2 2 1 1 Assume bfr=3, so RID = (3quotient,3remainder) a0 1 a1 1 a2 1 a3 1 a4 1 a5 1 B61 1 B62 1 B63 1 B71 1 B72 1 C81 1 C82 1 C83 1 C91 1 C921 1 C922 1 C93 1 C 1 a0 1 a1 1 a2 1 a3 1 a4 1 a5 1 RRN 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 B61 1 B62 1 B63 1 B71 1 B72 1 C81 1 C82 1 C83 1 C91 1 C921 1 C922 1 C93 1
14
RRN a0 a1 a2 a3 a4 a5 B6 B7 C C C {m, b} {c } 1 { b} { t} 1 { e } { n,p } 1 {m, b} { t} 1 {m } { n,p } 1 {m,e } { n,p } 1 {m } { n,p } 1 {m, b} {c } 1 { b} { t} 1 { e } { n,p } 1 {m } { n,p } 0 { b} { t} 0 { e } { n,p } 0 {m,e } { n,p } 0 {m } { n,p } 0 {m, b} {c } 0 { e } { n,p } 0 Distance fctn: d(p,q)={wi : p & q differ at i} must have: w61=2*w62=4*w w71=2*w72 w93=2*w921=2*w922=2*w91 w83= w82=w81 Vote function: vote= 1/(1+distance) wi : a0 1 a1 1 a2 1 a3 1 a4 1 a5 1 RRN 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 B61 1 B62 1 B63 1 B71 1 B72 1 C81 1 C82 1 C83 1 C91 1 C921 1 C922 1 C93 1 C 1 a0 1 a1 1 a2 1 a3 1 a4 1 a5 1 B61 1 B62 1 B63 1 B71 1 B72 1 C81 1 C82 1 C83 1 C91 1 C921 1 C922 1 C93 1
15
0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 unclassified sample 0-ring:
C922 1 C921 1 unclassified sample ring: C91 1 C83 1 C82 1 C81 1 B72 1 B71 1 B63 1 Distance fctn: d(p,q)={wi : p & q differ at i} must have: w61=2*w62=4*w w71=2*w72 w93=2*w921=2*w922=2*w91 w83= w82=w81 Vote function: vote= 1/(1+distance) B62 1 B61 1 a4 1 a3 1 wi a0 1 a0 1 a1 1 a2 1 a3 1 a4 1 a5 1 B61 1 B62 1 B63 1 B71 1 B72 1 C81 1 C82 1 C83 1 C91 1 C921 1 C922 1 C93 1 C 1 a0 1 a1 1 a2 1 a3 1 a4 1 a5 1 B61 1 B62 1 B63 1 B71 1 B72 1 C81 1 C82 1 C83 1 C91 1 C921 1 C922 1 C93 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.