'모두를 위한딥러닝'에 해당되는 글 1건

  1. 2017.12.07 [학습] 모두를 위한 딥러닝 #3 Lec 05-1, 05-2, Lab 05

Lec 05-1 - Logistic Classification의 가설 함수 정의


 

 

1. Classification

   - Regression은 특정 값을 예측하는 것에 비해, Classification은 분류 하는 것, 

   - binary Classification은 두개 중 하나 분류,  Ture / False    1/0

   - Spam Detection: Spam or Ham

   - Facebook feed: show or hide

   - Credit Card Fraudulent Transaction detection: legitimate/fraud

  

2. Logistic Hypothesis

   1) Linear Regression 적용시 문제점 

     - 과도하게 크거나 작은 범위의 값이 적용될 경우 왜곡이 쉽게 발생함   

      EX)  5시간 공부해도 합격, 100 시간 공부해도 합격

   2) 0과 1사이의 Cost Fuction :   logistic function / sigmoid function

        

       sigmoid  : Curved in two directions, like the letter "S", or the Greek ς (sigma)

   

                       sigmoid 함수에 대한 이미지 검색결과

 

 

    3) Logistic Hypothesis with Vector

        

 

 

 

 

 

Lec 05-2 - Logistic Regression의 cost 함수 설명

       

 

1. cost Function   

 

   1) 기존 코스트 함수 : local minimum 발생으로 최소값을 찾기 곤란함

      

       

   2) New Cost Function Concept

    

    (그래프 그려주는 사이트 : https://www.desmos.com/calculator )

 

2. understanding New cost Fuction

       - y=1,  H(x) =1     -> correct   -> cost Low  :    C( H(x), y) = -log ( 1 ) = 0 

       - y=1,  H(x) =0     -> wrong    -> cost high  :    C( H(x), y) = -log ( 0 ) = 무한대

       - y=0,  H(x) =0     -> correct   -> cost Low  :    C( H(x), y) = -log ( 1 - 0) = 0 

       - y=0,  H(x) =1     -> wrong    -> cost high :    C( H(x), y) = -log ( 1 - 1) =  - log (0) =  무한대 

 

3. New cost Fuction  : 두 경우의 선형 조합

 

     

 

4. Minimize Cost

      

     

 

 

 

Lab 05: TensorFlow로 Logistic Classification의 구현하기

 

1. Logistic Regression

 

   

   

 

 

2. code

 

 

 

 

 

 

 

 

Posted by 꿈을펼쳐라
,