Skip to content

Instantly share code, notes, and snippets.

View JiteshPshah's full-sized avatar

Jitesh JiteshPshah

  • Bangalore
View GitHub Profile
ρ(point,centroid) = |x2 – x1| + |y2 – y1|
Points Centroid1 Centroid2 centroid3
(4 3) (7 7) (6 5)
A(1 2) 
B(2 4) 
C(3 3) 
D(4 3)
E(4 6)
F(5 8)
G(7 7)
H(8 5)
ρ(point,centroid) = |x2 – x1| + |y2 – y1|
ρ((1,5), (4,2)) = |x2 – x1| + |y2 – y1|
= |1 – 4| + |5 – 2|
= 3 + 3
= 6
ρ((1,5), (2,9)) = |x2 – x1| + |y2 – y1|
= |1 – 2| + |5 – 9|
= 1 + 4
= 5
ρ((1,5), (6,9)) = |x2 – x1| + |y2 – y1|
sr.no No of Bedrooms Cost of the house($ 1000)
1 5 460
2 2 230
3 3 300
4 4 385
5 1 150
6 3 325