"Machine learning algorithms principles and programming Practices" study notes (iii)

Source: Internet
Author: User

(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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.