선형대수학, numpy

Date:     Updated:

카테고리:

태그:

Norm

n차원 벡터 $\overrightarrow{x} = (x_1, x_2, …, x_n)$ 에 대해
Norm $||\overrightarrow{x}|| = \sqrt{x^2_1, x^2_2, …, x^2_n}$
원점 O에서 점 $(x_1, x_2, …, x_n)$ 까지 이르는 거리
image


내적

Euclidean inner product, Dot product
\(\overrightarrow{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} , \overrightarrow{y} = \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} 일 때, \vec{x} \cdot \vec{y} = x_1y_1 + x_2y_2 + x_3y_3\)

Matrix Arithmetic

  • 행렬끼리 곱할 때는 차원을 주의해야 한다.

image
image

Transpose

  • 전치행렬은 원 행렬의 행과 열을 뒤바꾼 행렬이다.

\(A = \begin{bmatrix} 1 & 2 & -1 \\ 4 & 3 & 0 \end{bmatrix} 일 때,\) \(A^T = \begin{bmatrix} 1 & 4 \\ 2 & 3 \\ -1 & 0 \end{bmatrix}\)


Numpy

행렬 곱셈

image

Numpy Array - 논리연산

image

Logical Reductions

image

Statistical Reductions

image




ML 카테고리 내 다른 글 보러가기

댓글 남기기