A data challenge a day helps you master machine learning
Hello,
Here's my solution:
# DDC-50: Singular values of a diagonal matrix
import numpy as np
mat = np.zeros((5,8))
for i in range (0,5):
for j in range (0,5):
if i == j:
mat [i,j] = (i+1)**2
print (mat)
U, s, Vh = np.linalg.svd (mat)
print (s)
Hello,
Here's my solution:
# DDC-50: Singular values of a diagonal matrix
import numpy as np
mat = np.zeros((5,8))
for i in range (0,5):
for j in range (0,5):
if i == j:
mat [i,j] = (i+1)**2
print (mat)
U, s, Vh = np.linalg.svd (mat)
print (s)