homework4sol

homework4sol - CS573: Homework 4 Solution Part of the...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS573: Homework 4 Solution Part of the solution is based on Wahbeh Q.’s submission 1 Between cluster distances (4 pts) Let cluster C i contain n i samples, and let d ij be some measure of distance between two clusters C i and C j . In general, one might expect that if C i and C j are merged to form a new cluster C k , then the distance from C k to some other cluster C h is not simply related to d hi and d hj . However, consider the equation: d hk = α i d hi + α j d hj + βd ij + γ | d hi - d hj | Show that the following choices for the coefficients α i j ,β,γ lead to the distance functions indi- cated. 1. Single-link: α i = α j = 0 . 5 = 0 = - 0 . 5 Sample solution: d hk = α i d hi + α j d hj + ij + γ | d hi - d hj | = 0 . 5 d hi + 0 . 5 d hj - 0 . 5 | d hi - d hj | = ( 0 . 5 d hi + 0 . 5 d hj - 0 . 5 d hi + 0 . 5 d hj , if d hi d hj 0 . 5 d hi + 0 . 5 d hj - 0 . 5 d hj + 0 . 5 d hi , if d hi < d hj = ( d hj , if d hi d hj d hi , if d hi < d hj = min { d hj ,d hi } = min { min u C h ,v C j d ( u,v ) , min u C h ,v C i d ( ) } = min u C h ,v C j C i { d ( ) } = min u C h ,v C k { d ( ) } = d hk 2. Complete-link: α i = α j = 0 . 5 = 0 = +0 . 5 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sample solution: d hk = α i d hi + α j d hj + βd ij + γ | d hi - d hj | = 0 . 5 d hi + 0 . 5 d hj + 0 . 5 | d hi - d hj | = ( 0 . 5 d hi + 0 . 5 d hj + 0 . 5 d hi - 0 . 5 d hj , if d hi d hj 0 . 5 d hi + 0 . 5 d hj + 0 . 5 d hj - 0 . 5 d hi , if d hi < d hj = ( d hi , if d hi d hj d hj , if d hi < d hj = max { d hj ,d hi } = max { max u C h ,v C j d ( u,v ) , max u C h ,v C i d ( ) } = max u C h ,v C j C i { d ( ) } = max u C h ,v C k { d ( ) } = d hk 3. Average-link: α i = n i n i + n j j = n j n i + n j = γ = 0 Sample solution: d hk = α i d hi + α j d hj + ij + γ | d hi - d hj | = n i n i + n j d hi + n j n i + n j d hj = n i n i + n j ± u C h ,v C i d ( ) n i ² + n j n i + n j u C h ,v C j d ( ) n j ! = u C h ,v C i C j d ( ) n i + n j = u C h ,v C k d ( ) n k = d hk 4. Between-cluster distance (i.e., squared Euclidean distance between centroids): α i = n i n i + n j j = n j n i + n j = - α i α j = 0 Sample solution: Let m i denote the centroid of C i , which is 1 n i u C i u . Furthermore, let d 2 Eu denote the squared Euclidean distance 2
Background image of page 2
d hk = α i d hi + α j d hj + βd ij + γ | d hi - d hj | = n i n i + n j d hi + n j n i + n j d hj - n i n j ( n i + n j ) 2 d ij = n i d 2 Eu ( m h ,m i ) n i + n j + n j d 2 Eu ( m h j )) n i + n j - n i n j d 2 Eu ( m i j ) ( n i + n j ) 2 = n i ( m h - m i ) 2 n i + n j + n j ( m h - m j ) 2 n i + n j - n i n j ( m i - m j ) 2 ( n i + n j ) 2 = n i m 2 h - 2 n i m h m i + n i m 2 i + n j m 2 h - 2 n j m h m j + n j m 2 j n i + n j - n i n j ( m i - m j ) 2 ( n i + n j ) 2 = m 2 h ( n i + n j ) + n i m 2 i + n j m 2 j - 2 m h ± u C i u + u C j u ² n i + n j - n i n j ( m i - m j ) 2 ( n i + n j ) 2 = m 2 h ( n i + n j ) + n i m 2 i + n j m 2 j - 2 m h ± u C i C j u ² n i + n j - n i n j ( m i - m j ) 2 ( n i + n j ) 2 = m 2 h - 2 m h m k + n i m 2 i + n j m 2 j n i + n j - n i n j ( m i - m j ) 2 ( n i + n j ) 2 = m 2 h - 2 m h m k + ( n i + n j ) n i m 2 i + ( n i + n j ) n j m 2 j - n i n j ( m i - m j ) 2 ( n i + n j ) 2 = m 2 h - 2 m h m k + n 2 i m 2 i + 2 n i n j m i m j + n 2 j m 2 j ( n i + n j ) 2 = m 2 h - 2 m h m k + ( n i m i + n j m j ) 2 ( n i + n j ) 2 = m 2 h - 2 m h m k + u C i C j u n i + n j !
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/13/2012 for the course CS 573 taught by Professor Staff during the Fall '08 term at Purdue.

Page1 / 11

homework4sol - CS573: Homework 4 Solution Part of the...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online