Class 3 4 5 Flashcards

1
Q

What is a gradient based optimization?

A

A gradient based opptimization is used to maximize/minimize the objective function.
Minimizing cost/errors..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a derivative and how do we calculate it?

A

A derivative gives a slope of the function f(x)
We can calculate it as limit epsilon goes to zero
f(x+epsilon)-f(x) / epsilon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a critical point for gradeints ? and why?

A

the critical points of the graident is local minima local maxima and saddle points. these points are critical because, the gradeint of those points are zero, therefore those points give us 0, no information. Percepton uses step function but the gradient of it is zero

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to find a minima?

A

We find a minima, given an objective function,J (z) = z^2
we calculate the derivative (gradient of it) J’(z) = 2z
We start from a random variable assigned to z
we update z according to the opposite direction of the gradient
z = z - alpha. J’(z)
we continue to do that untill it converges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a gradient?

A

A gradient is the generalization of the derivates with respect to vector of input variables, calculations are easy but instead of a single variable now we have a vectoral input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is a gradient descend?

A

Idea: decrease the function f, by moving it in the opposite direction of the gradient.
x’ = x - alpha . J’(x)
alpha is learning rate which is too small

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Jacobian matrix?

A

A jacobian matrix is the matrix of all the partilal derivatives

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between taking the first derivatve vs second derivative?

A

First derivative gives us the information about the function and how quickly a function changes, the second order derivative gives us the curvature information and how quickly a derivaative changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does it mean to have the second order derivative equal to zero <= 0 , > = 0

A

If the second order derivative is zero, it means that there is no curvature and we have a line. If <=0 it means that it is underestimating therefore, the improvement is really bad, >=0 overestimating, the increase or decrease of a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a heissian matrix? Explain everything briefly.

A

A heissian matrix is the matrix composed of the second order derivatives, there is a condition number of the heissian which can be found by the ratio between tthelargest and the smallest eigen value.
It is really slow because we first need to compute the heisssian matrix.
We dont use it generally in NN because in NN we use first order derivatives.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is entropy? What is KL divergence? What is cross entropy?

A

Entropy means that the information available. KL divergence is used to calculate the differences between the two prob. distriibutions P(x) and Q(x), it is not the true distance because they are not symmetric
Miinimizing cross entropy P wrt Q, leads to minimizing the KL divergence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why using MSE is a bad choice in NNs especially in classification?

A

When using mean squared error we assume that our data has a normal(gaussian) distribution. But in reality in our data when for example we want to classify, we can classify it in to 2 clases, which is bernoulli and wont be in a normal distribution anymore.
MSE used in linear regression as maximum likelihoodç

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Maximum lilelihood? What are the improvemnets done?

A

Maximum likelihood is the probability of the classification of best model trained on the data. P(x,model)
argmax ÇARPIM p(x,model)
but this gives an unstable calculation therefore we calculate it as
argmax TOPLAM log p(x,model)

If we want to minimize the KL divergence, therefore the cross entropy, we need to minimize the Maximum Likelihoodd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is conditional log likelihood?

A

Conditional log likelihood is estimating the conditional probability(supervised learning)
argmax TOPLAM log P(y|x,model)
(given y predict x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly