(First chapter above)
1.2.5 Linalg Linear Algebra Library
Based on the basic operation of matrices, the Linalg Library of NumPy can satisfy most linear algebra operations.
. determinant of matrices
. Inverse of the Matrix
. Symmetry of matrices
. The rank of the matrix
. The reversible matrix solves the linear equation
1. Determinant of matrices
from Import * in[#N-order matrix determinant operation in [6]: A = Mat ([[[1,2,3],[4,5,6],[7,8,9]]) in [print]det (A):"6.66133814775e-16
2. Inverse of the Matrix
from Import * in[9]: A = Mat ([[[1,2,3],[4,5,6],[7,8,9]]) in [ten]: Inva = LINALG.INV (A)# Inverse of Matrix In [print]INV (A):"-4.50359963e+15 9.00719925e+15 -4.50359963e+15] [ 9.00719925e+15 -1.80143985e+16 9.00719925e+15- 4.50359963e+15 9.00719925e+15 -4.50359963e+15]]
3. Symmetry of the Matrix
from Import * in[+]: A = Mat ([[[1,2,3],[4,5,6],[7,8,9]]) in []: at= a.tin [Print *50 122 194] [122]
4. Rank of matrix
from Import * in[+]: A = Mat ([[[1,2,3],[4,5,6],[7,8,9]]) in [print Linalg.matrix_rank (A)# rank 2 of matrix
5. Reversible Matrix Solution
Source: "Machine learning algorithm principles and programming practices" Zheng Jie
Principles of machine learning algorithms and Programming Practices study notes (c)