add similarities and finish parts of matandmeth
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build Typst document / build_typst_documents (push) Failing after 7s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build Typst document / build_typst_documents (push) Failing after 7s
				
			This commit is contained in:
		@@ -283,21 +283,40 @@ The softmax function has high similarities with the Boltzmann distribution and w
 | 
				
			|||||||
=== Cross Entropy Loss
 | 
					=== Cross Entropy Loss
 | 
				
			||||||
#todo[Maybe remove this section]
 | 
					#todo[Maybe remove this section]
 | 
				
			||||||
Cross Entropy Loss is a well established loss function in machine learning.
 | 
					Cross Entropy Loss is a well established loss function in machine learning.
 | 
				
			||||||
Equation~\eqref{eq:crelformal}\cite{crossentropy} shows the formal general definition of the Cross Entropy Loss.
 | 
					@crel #cite(<crossentropy>) shows the formal general definition of the Cross Entropy Loss.
 | 
				
			||||||
And equation~\eqref{eq:crelbinary} is the special case of the general Cross Entropy Loss for binary classification tasks.
 | 
					And @crel is the special case of the general Cross Entropy Loss for binary classification tasks.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$
 | 
					$
 | 
				
			||||||
H(p,q) &= -sum_(x in cal(X)) p(x) log q(x)\
 | 
					H(p,q) &= -sum_(x in cal(X)) p(x) log q(x)\
 | 
				
			||||||
H(p,q) &= -(p log(q) + (1-p) log(1-q))\
 | 
					H(p,q) &= -(p log(q) + (1-p) log(1-q))\
 | 
				
			||||||
cal(L)(p,q) &= -1/N sum_(i=1)^(cal(B)) (p_i log(q_i) + (1-p_i) log(1-q_i))
 | 
					cal(L)(p,q) &= -1/N sum_(i=1)^(cal(B)) (p_i log(q_i) + (1-p_i) log(1-q_i))
 | 
				
			||||||
$
 | 
					$ <crel>
 | 
				
			||||||
 | 
					#todo[Check how multiline equation refs work]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Equation~$cal(L)(p,q)$~\eqref{eq:crelbinarybatch}\cite{handsonaiI} is the Binary Cross Entropy Loss for a batch of size $cal(B)$ and used for model training in this Practical Work.
 | 
					Equation~$cal(L)(p,q)$ @crel #cite(<handsonaiI>) is the Binary Cross Entropy Loss for a batch of size $cal(B)$ and used for model training in this Practical Work.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=== Cosine Similarity
 | 
					=== Cosine Similarity
 | 
				
			||||||
 | 
					To measure the distance between two vectors some common distance measures are used.
 | 
				
			||||||
 | 
					One popular of them is the Cosine Similarity (@cosinesimilarity).
 | 
				
			||||||
 | 
					It measures the cosine of the angle between two vectors.
 | 
				
			||||||
 | 
					The Cosine Similarity is especially useful when the magnitude of the vectors is not important.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$
 | 
				
			||||||
 | 
					  cos(theta) &:= (A dot B) / (||A|| dot ||B||)\
 | 
				
			||||||
 | 
					  &= (sum_(i=1)^n  A_i B_i)/ (sqrt(sum_(i=1)^n A_i^2) dot sqrt(sum_(i=1)^n B_i^2))
 | 
				
			||||||
 | 
					$ <cosinesimilarity>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#todo[Source?]
 | 
				
			||||||
=== Euclidean Distance
 | 
					=== Euclidean Distance
 | 
				
			||||||
 | 
					The euclidean distance (@euclideannorm) is a simpler method to measure the distance between two points in a vector space.
 | 
				
			||||||
 | 
					It just calculates the square root of the sum of the squared differences of the coordinates.
 | 
				
			||||||
 | 
					the euclidean distance can also be represented as the L2 norm (euclidean norm) of the difference of the two vectors.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$
 | 
				
			||||||
 | 
					  cal(d)(A,B) = ||A-B|| := sqrt(sum_(i=1)^n (A_i - B_i)^2)
 | 
				
			||||||
 | 
					$ <euclideannorm>
 | 
				
			||||||
 | 
					#todo[Source?]
 | 
				
			||||||
== Alternative Methods
 | 
					== Alternative Methods
 | 
				
			||||||
 | 
					
 | 
				
			||||||
There are several alternative methods to few-shot learning which are not used in this bachelor thesis.
 | 
					There are several alternative methods to few-shot learning which are not used in this bachelor thesis.
 | 
				
			||||||
 | 
					#todo[Do it!]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user