Logistic Regression Flashcards

(6 cards)

1
Q

Steps in logistic Regression

A
  1. Desing an appropriate function for y based on x
  2. and build a probabilistic model for p(y|x)
  3. Determine parameters of the function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Step 1

A

Determine an appropriate function that maps the data to a class

y_pred=f(x)=σ(z) with z=w^Tx

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

Step 2

A

For example p(y=1|x;theta)=f(x)
p(y=0|x;theta)=1-f(x)

Or as Bernoulli

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

Step 3

A

Determine parameters of the function
-> maximize the likelihood function

L(theta)=p(Y|X,theta)

And build the log likelihood

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

What is a problem of the log-likelihood derivative?

A

It does not lead to a closed form solution.

Solution: iterative non-linear optimization with gradient descent

theta = argmin L(theta)
theta := theta-alpha*l(theta)

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

What training algorithm is being used?

A

Stochastik gradient Descent

function SGD(D, alpha):
Initialize theta with a small random value
repeat
for d=1 to m do:
theta <- theta + alpha*delte_theta
end for
until change of theta is small
return theta
end function

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