k4d3 commited on
Commit
01d02c7
1 Parent(s): 0484c36

Signed-off-by: Balazs Horvath <[email protected]>

LINEAR_ALGEBRA.md DELETED
@@ -1,120 +0,0 @@
1
- # Linear Algebra for Furries
2
-
3
- <!--markdownlint-disable MD033 -->
4
-
5
- ## Linear Algebra Basics
6
-
7
- Linear Algebra is a branch of mathematics that deals with vectors, vector spaces and linear transformations. It has wide applications in fields like physics, computer graphics, data analysis and generating yiff.
8
-
9
- ### Vectors
10
-
11
- ---
12
-
13
- Vectors are mathematical objects that have both magnitude (size) and direction. They can represent physical quantities like force, velocity or displacement. For example, if you're a furry running in a park, your velocity is a vector - it has a speed (magnitude) and a direction you're running in.
14
-
15
- <img src="https://huggingface.co/k4d3/yiff_toolkit/resolve/main/static/linear_algebra/furry-running.jpg" alt="A furry running in a park." width="512" height="512"/>
16
-
17
- *This furry has a velocity.*
18
-
19
- Vectors are often represented as an array of numbers, where each number corresponds to a coordinate in space. In a 2D plane, a vector $v$ can be represented as an ordered pair: $v = [v_1, v_2]$. Here $v_1$ and $v_2$ are the components of $v$ along the x and y axes respectively.
20
-
21
- For example, the vector $v = [2, 3]$ can be visualized as an arrow starting at the origin $(0, 0)$ and pointing 2 units in the positive x-direction and 3 units in the positive y-direction.
22
-
23
- #### Vector Addition
24
-
25
- If you have two vectors, you can add them together to get a new vector. This is done by adding the corresponding components of the vectors. For example if $a = [2, 3]$ and $b = [1, 4]$ then $a + b = [2+1, 3+4] = [3, 7]$.
26
-
27
- #### Scalar Multiplication
28
-
29
- You can multiply a vector by a scalar (regular number) to get a new vector. This is done by multiplying each component of the vector by the scalar. For example if $c = 2$ and $b = [1,4 ]$ then $c * d = [2*3, 2 *4] = [6, 8]$.
30
-
31
- #### Dot Product
32
-
33
- The dot product of two vectors is a scalar quantity that is the sum of the products of the corresponding components of the vectors. For example if $e = [2, 3]$ and $f = [4, 5]$, then $e \cdot f = 2*4 + 3*5 = 23$
34
-
35
- #### Magnitude (or Length)
36
-
37
- The magnitude of a vector $g = [a, b]$ is given by the square root of the sum of the squares of its components. This is denoted as $||g||$ and calculated as $||g|| = \sqrt{a^2 + b^2}$
38
-
39
- ### Matrices
40
-
41
- ---
42
-
43
- A matrix is a rectangular array of numbers arranged in rows and columns. Matrices are used to represent and manipulate linear equations. Each number in the matrix is called an element or entry. The position of an element is defined by its row number and column number.
44
-
45
- A `2x2` matrix can be represented as follows:
46
-
47
- $$A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}$$
48
-
49
- #### Matrix Addition and Subtraction
50
-
51
- Matrices can be added or subtracted element by element if they are of the same size. For example if we have two `2x2` matrices $A$ and $B$ then the sum $A+B$ is a new `2x2` matrix where each element is the sum of the corresponding elements in $A$ and $B$.
52
-
53
- It can be represented as:
54
- $$A + B = \begin{bmatrix} a1 & b1 \\ c1 & d1 \end{bmatrix} + \begin{bmatrix} a2 & b2 \\ c2 & d2 \end{bmatrix} = \begin{bmatrix} a1+a2 & b1+b2 \\ c1+c2 & d1+d2 \end{bmatrix}$$
55
-
56
- #### Scalar Multiplication of a Matrix
57
-
58
- A matrix can be multiplied by a scalar. This is done by multiplying each element of the matrix by the scalar.
59
-
60
- $$kA = k \cdot \begin{bmatrix} a & b \\ c & d \end{bmatrix} = \begin{bmatrix} ka & kb \\ kc & kd \end{bmatrix}$$
61
-
62
- #### Matrix Multiplication
63
-
64
- The multiplication of two matrices is more complex than their addition. For two matrices to be multiplied, the number of columns in the first matrix must be equal to the number of rows in the second matrix.
65
-
66
- $$AB = \begin{bmatrix} a1 & b1 \\ c1 & d1 \end{bmatrix} \cdot \begin{bmatrix} a2 & b2 \\ c2 & d2 \end{bmatrix} = \begin{bmatrix} a1*a2 + b1*c2 & a1*b2 + b1*d2 \\ c1*a2 + d1*c2 & c1*b2 + d1*d2 \end{bmatrix}$$
67
-
68
- #### Identity Matrix
69
-
70
- This is a special type of square matrix where all the elements of the principal diagonal are ones and all other elements are zeros. The identity matrix play a similar role in matrix algebra as the number 1 in regular algebra.
71
-
72
- $$I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$
73
-
74
- #### Determinant
75
-
76
- The determinant is a special number that can be calculated from a square matrix. It has many important properties and uses, such as providing the solution of a system of linear equations.
77
-
78
- $$det(A) = det\begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc$$
79
-
80
- #### Inverse
81
-
82
- The inverse of a matrix $A$ is another matrix, denoted as $A^{-1}$, such that when $A$ is multiplied by $A^{-1}$, the result is the identity matrix. Not all matrices have an inverse.
83
-
84
- $$A^{-1} = \frac{1}{det(A)} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}$$
85
-
86
- #### Transpose
87
-
88
- The transpose of a matrix is a new matrix whose rows are the columns of the original matrix and whose columns are the rows.
89
-
90
- $$A^T = \begin{bmatrix} a & c \\ b & d \end{bmatrix}$$
91
-
92
- - **Linear equations** are equations of the first order, representing straight lines in geometry. They are characterized by constants and variables without exponents or products of variables.
93
- - **Eigenvalues** and **Eigenvectors** are special sets of scalars and vectors associated with a matrix. They are fundamental in the study of linear transformations.
94
- - **Orthogonal Matrices** are square matrices whose columns and rows are orthogonal unit vectors (orthonormal vectors)
95
-
96
- ---
97
-
98
- ## Kolmogorov-Arnold Representation Theorem
99
-
100
- The Kolmogorov-Arnold Representation Theorem, also known as the superposition theorem, is a significant result in real analysis and approximation theory.
101
-
102
- It was first proved by Andrey Kolmogorov in 1956 and later extended by his student Vladimir Arnold in 1957.
103
-
104
- The theorem states that every multivariate continuous function can be represented as a superposition of continuous functions of one variable. More specifically, if $f$ is a multivariate continuous function, then $f$ can be written as a finite composition of continuous functions of a single variable and the binary operation of addition.
105
-
106
- The mathematical representation is as follows:
107
-
108
- $$f(x_1, \ldots, x_m) = \sum_{i=1}^{2m+1} \Phi_i \left( \sum_{j=1}^{m} \phi_{i,j}(x_j) \right)$$
109
-
110
- Where $\Phi_i$ and $\phi_{i,j}$ are continuous monotonically increasing functions on the interval $[0,1]$
111
-
112
- This theorem solved a more constrained form of Hilbert’s thirteenth problem, so the original Hilbert’s thirteenth problem is a corollary. In a sense, they showed that the only true multivariate function is the sum, since every other function can be written using univariate functions and summing.
113
-
114
- There is a longstanding debate whether the Kolmogorov-Arnold representation theorem can explain the use of more than one hidden layer in neural networks. The Kolmogorov-Arnold representation decomposes a multivariate function into an interior and an outer function and therefore has indeed a similar structure as a neural network with two hidden layers.
115
-
116
- ## Kolmogorov-Arnold Networks
117
-
118
- ---
119
-
120
- Kolmogorov-Arnold Networks (KANs) are a type of neural network inspired by the Kolmogorov-Arnold representation theorem. They are proposed as promising alternatives to Multi-Layer Perceptrons (MLPs)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/linear_algebra/furry-running.jpg DELETED

Git LFS Details

  • SHA256: cddc21f185a4079bdf9c54aa7349b87a7f011c44d1b5b36282d750c7ac7947d8
  • Pointer size: 131 Bytes
  • Size of remote file: 147 kB