首页 > 系统服务 > 详细

Machine learning(3-Linear Algebra Review )

时间:2021-06-08 13:43:50      阅读:17      评论:0      收藏:0      [点我收藏+]

1、Matrices and vectors

  • Matrix :Rectangular array of numbers

技术分享图片

a notation R3×3

  • Vector : An n×1 matrix

技术分享图片

this is a three dimensional vector , a notation R3

  • 技术分享图片

2、Addition and scalar multiplication

  • 技术分享图片
  • 技术分享图片
  • 技术分享图片

3、Matrix-vector multiplication

4、Matrix-matrix multiplication

  • Same as above

5、Matrix multiplication properties

  • No commutative A×B ≠ B×A (B is not identity matrix)
  • Yes associative (A×B)×C=A×(B×C)
  • 技术分享图片
  • For any matrix A, A×I = I×A = A

6、Inverse and transpose

  • Inverse :

we can use python to implement and for example :

from numpy import *

# 自行判断|A|≠0
# 求逆矩阵 ,建议:取小数点后一位化为分数

A = mat([[1, -1, 1],
         [1, 1, 0],
         [-1, 0, 1]])

B = A.I
print(B)

#  [ 0.33333333  0.33333333 -0.33333333]
#  [-0.33333333  0.66666667  0.33333333]
#  [ 0.33333333  0.33333333  0.66666667]
# 0.333≈ 1/3 ,0.667≈ 2/3
  • Transpose :

技术分享图片

Machine learning(3-Linear Algebra Review )

原文:https://www.cnblogs.com/wangzheming35/p/14861953.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!