def SVD_Vec(matData, dimension): svd = TruncatedSVD(n_components=dimension) newData = svd.fit_transform(matData) return newData