0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

1. Numpy 【Math2Code】

0
Posted at

数式をコードに直すことが増えてきたのでメモ.
よく使うnumpyを挙げてみた.

  • np.dot()  : 内積
  • np.linalg.inv(): 逆行列
  • np.linalg.det(): 行列
  • np.eye(): one-hot表現ないし単位行列
  • np.random.randn(d, n): 標準正規分布に従うd次元×n個のデータ
  • .T: 転置
  • np.linalg.norm(): ノルム
  • np.log(): log
  • np.exp(): exp
  • np.pi: π
  • np.sqrt(): ルート
  • np.meshgrid: 格子点
  • np.sin(): sin
  • np.cos(): cos
  • np.linalg.eig(): 固有値,固有ベクトル
  • np.linspace(): 等差数列
  • np.where(): 条件を満たす要素にTrueを返す
  • np.linalg.pinv(): 一般化逆行列(ゼロ固有値を無視して逆行列を求める)
  • np.cov(): 共分散を求める
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?