

【Python】【numpy】linalg线性代数
source link: https://www.guofei.site/2017/07/05/numpylinalg.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

【Python】【numpy】linalg线性代数
2017年07月05日Author: Guofei
文章归类: 1-2-Pandas与numpy ,文章编号: 1101
版权声明:本文作者是郭飞。转载随意,但需要标明原文链接,并通知本人
原文链接:https://www.guofei.site/2017/07/05/numpylinalg.html
总结
函数 说明 diag (输入是2维时)对角线(第k个)转1维阵 diag (输入是1维时)一维阵转对角阵 dot 矩阵乘法 trace 对角线元素和 det 对应行列式值 eig 特征值和特征向量 inv 矩阵的逆 pinv 矩阵的Moore-Pwnrose伪逆 qr QR分解 svd SVD分解
行列式
import numpy as np
a=np.random.uniform(0,1,size=(10,10))
b=np.random.uniform(0,1,size=(10,1))
A=np.linalg.det(a)
矩阵的转置
a.T
矩阵的特征值特征向量
eigenvalues,eigenvectors=np.linalg.eig(a)
矩阵的逆
np.linalg.inv(a)
矩阵的秩
np.linalg.matrix_rank(a)
矩阵的积
np.dot(a,b)
注意,这里的a,b必须是多维的,否则返回的是內积(对应项相乘)
矩阵的点积
a*b
数据清洗
np.where
np.argwhere(name_data) # 矩阵中,非零元素的坐标
您的支持将鼓励我继续创作!
Recommend
-
24
linalg/g2c.h at be3d91112daa0def5818dfd566006c273fa2d82e · bdollard/linalg · GitHub
-
113
solidot新版网站常见问题,请点击这里查看。 提交文章 ...
-
36
Elegant NumPy functions for neat programming
-
10
人工智能的基础是数学,线性代数又是其中的重要部分。然而,对于数学基础不好的人来说,「线性代数」是一门非常抽象的课程。如何学习线性代数呢?这个 GitHub 项目介绍了一份入门级线性代数课程讲义,适合大学生、程序员、数据分析师、算...
-
16
NumPy Tutorial: Your First Steps Into Data Science in Python ...
-
6
从头开始实现一个线性代数库:Python 模块篇 2018.05.29 Netcan
-
11
Working With Linear Systems in Python Wi...
-
13
结合scipy.linalg在Python中使用线性系统 - 华为云开发者社区的个人空间 - OSCHINA - 中文开源技术交流社区 摘要:将线性代数概念应用到实际问题中scipy.linalg 使用 Python 和 NumPy处理向量和矩阵 使用线性系统模拟...
-
3
Python数据分析--Numpy常用函数介绍(9)-- 与线性代数有关的模块linalg numpy.linalg 模块包含线性代数的函数。...
-
4
Introduction Linear algebra, a foundational concept in mathematics, is a powerful tool with applications spanning various domains, including data science, machine learning, and computer graphics. At the core of linear...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK