Practice Question 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Practice Problems 2

1. Suppose we have points at the locations: x1=(1,3), x2=(4,7), x3=(2,9), x4=(2,2), x5=(3,6). Suppose, the
k-means algorithm (k = 2) initially picks centroids at (1,4) and (4,4). (i) Which points will be assigned
to each centroid? (ii) What will be the location of the new centers? (iii) if c1 is one the centroids, is
the following statements true or false: z = c1, is the vector for which ∑5𝑖=1 ∥ 𝑧 − 𝑥𝑖 ∥2 minimized.
Justify your answer.
2. Complete the derivation of c1 and c2 in finding Least square regression line (slide 2-38), show that
the regression line can be expressed as
𝜌𝑎𝑏 𝑠𝑡𝑑(𝑏)
𝑓(𝑥) = 𝑎𝑣𝑔(𝑏) + (𝑥 − 𝑎𝑣𝑔(𝑎))
𝑠𝑡𝑑(𝑎)
3. Find the adjacency matrix A of the following graph.
a. Find A1. What does the entries in A1 represent?
b. Find A2. What do the non-zero numbers in A2 represent.

4. VLMS Exercise 6.15 [We have not discussed norm of a matrix in class, however the definition is given
in p122 and its quite simple. This norm is called the Frobenius norm.]
5. Show that the matrix A in slide 3-27 rotates vector x counterclockwise over an angle θ.
6. Show that the matrix B in slide 3-28 reflects the vector x with respect to a line through vector a
7. VLMS Exercise 7.2
8. VLMS Exercise 8.3
9. VLMS Exercise 8.4
10. VLMS Exercise 8.8
11. VLMS Exercise 10.11
12. VLMS Exercise 10.18
13. VLMS Exercise 10.21
14. VLMS Exercise 11.1
15. Run Gaussian elimination on the following system of linear equations. Find the elementary matrices
corresponding to each elementary row operation. Obtain the LU-factorization of the coefficient
matrix.

x1 - 3x2 + x3 = 4

2x1 - 8x2 + 8x3 = -2

-6x1 + 3x2 - 15x3 = 9

You might also like