Svd.
np.linalg.svd(dataset) # Extract the singular values and vectors singular_values = np.diag(s) left_singular_vectors = U right_singular_vectors = VT.T # Perform dimensionality reduction by selecting top k singular values and vectors k = 2 reduced_dataset = np.dot(np.dot(left_singular_vectors[:, :k],