Advertisement

Algorithm for Gram-Schmidt Transform

阅读量:

Gram-Schmidt 算法的核心功能在于实现对矩阵的正交化处理,从而将其转化为正交单位矩阵的形式。

复制代码
 # GRADED FUNCTION

    
 import numpy as np
    
 import numpy.linalg as la
    
  
    
 verySmallNumber = 1e-14 # That's 1×10⁻¹⁴ = 0.00000000000001
    
  
    
 # Our first function will perform the Gram-Schmidt procedure for 4 basis vectors.
    
 # We'll take this list of vectors as the columns of a matrix, A.
    
 # We'll then go through the vectors one at a time and set them to be orthogonal
    
 # to all the vectors that came before it. Before normalising.
    
 # Follow the instructions inside the function at each comment.

全部评论 (0)

还没有任何评论哟~