파이썬정복 2024. 7. 6. 02:12

linear regression

how to optimize this value

람다는 hyper-parameter - regularization constant

 

9장 optimization 

OLS case ) why are we doing optimization?

approximation

 

convex

task is to minimize the error

try to optimize the value by gradient 

how to optimize learning rate?

 

10. logistic regression & softmax

 

logistic regression -> completely classification (not for regression)

 

problem with linear regression

- The line seems to oversimplify the relationship

- It gives predictions that cannot be observable values of Y for extreme values of X.

-  The approach is analogous to fitting a linear model to the probability of the event, but now we need 1 or 0.

using sigmoid function

 

now this is important

 Likelihood function : probability of the observed data as a function of the unknown parameters

linear regression : minimization for cost function

 

asuumption 

multi classification 에도 적용할 수 있을까?

in this case, it is not adapted 

probability가 0과 1로만 나뉘어져있기 때문에 multi 클래스일때는 사용할 수 없다 

 

what we have to do is

a, b, c class 를 가지고 가능성 1을 나눈다

 

how to evaluate the performance? 

it's classification -> AUC curve // accuracy // F1 score

 

How to make a decision with Logistic regression?

between KNN and Logistic regression

we can get either 0 or 1

we can get the value from 0 to 1