Starting from:

$30

CSCI347-Homework 04 Solved

Show your work. Include any code snippets you used to generate an answer, using comments in the code to clearly indicate which problem corresponds to which code

1.    (2 points) Consider matrix A and vector v. Compute the matrix-vector product Av.

 

2.    Consider matrix A and data set D:

 

(a)     (2 points) Let X1 and X2 be the first and second attributes of the data, respectively. Use Python to create a scatter plot of the data, where the x-axis is X1 and the y-axis is X2.

(b)    (4 points) Treating each row as a 2-dimensional vector, apply the linear transformation A to each row. In other words, let xi be the i-th row of D. For each xi, find the matrix-vector product Axi. For example,  .

(c)     (3 points) Use Python to create a plot showing both the original data and the transformed data, with the x-axis still corresponding to X1 and the y-axis corresponding to X2. Use different colors and markers to differentiate between the original and transformed data. That is, each transformed data point in the plot should be one matrix-vector product Axi, which is a 2-dimensional vector. Each original point in the plot should have the same coordinates as it did in part 2.1.

(d)    (1 point) Write down the multi-dimensional mean of the data. (Remember that this should be a 2-dimensional vector)

(e)     (2 points) Mean-center the data. Write down the mean-centered data matrix.

(f)      (2 points] Use Python to create a scatter plot showing both the original data and the mean-centered data, where the x-axis is X1 and the y-axis is X2. Use different colors and markers to differentiate between the original and mean-centered data.

(g)     (3 points) Write down the covariance matrix of the data matrix D. Use estimated covariance.

(h)    (3 points) Write down the covariance matrix of the centered data matrix Z. Use estimated covariance.

(i)      (3 points) Write down the covariance matrix of the data after applying standard normalization.

More products