Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Test 1

1. Calculate the Euclidean distance between vectors (0,0), (1,0), (0,2) pairs (pairs means
D1 = Distance from (0,0) to(1,0); D2 = Distance from (0,0) to (0,2) ; D3 = Distance from
(1,0) to (0,2) )
D= 1.0000   2.0000    2.2361

2. Calculate the Manhattan distance between vectors (0,0), (1,0), (0,2) pairs
D= 1    2     3

3. Calculate the Chebyshev distance between vectors (0,0), (1,0), (0,2) pairs

D= 1    2     2

4. Calculate the Minkowski distance between vectors (0,0), (1,0), (0,2) pairs
D= 1.0000   2.0000    2.2361

5. Calculate the Mahalanobis Distance between vectors (1 2),( 1 3),( 2 2),


( 3 1) pairs
D= 2.3452   2.0000    2.3452    1.2247   2.4495    1.2247

6.Calculate the cosine of the angle between (1,0), (1,1.732), (- 1,0) pairs
D= 0.5000  -1.0000   -0.5000
7. Calculate the the Hamming distance between vectors (0,0), (1,0), (0,2) paris
D = 0.5000   0.5000    1.0000

You might also like