HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
장지원 페이지/
📑
AI Basic
/
#05.multi-class classification (at NN)

#05.multi-class classification (at NN)

상태
태그
DL
📌
신경망에서의 다중 클래스 분류 문제
 

[Refer]

TISTORYTISTORY분류 (3) - 다중 분류(Multiclass Classification)
분류 (3) - 다중 분류(Multiclass Classification)

분류 (3) - 다중 분류(Multiclass Classification)

이진 분류(Binary Classification)는 타깃의 값이 어떤 기준에 대하여 참(True) 또는 거짓(False)의 값을 가졌습니다. 다중 분류(Multiclass Classification)의 경우 타깃이 가질 수 있는 값이 3개 이상입니다. 타깃이 가지는 값에 대응되는 데이터의 모임을 클래스(class) 혹은 레이블(label)이라고 하기도 합니다. 다중 분류의 경우 단일 레이블 분류(single-label classification)에 속합니다. 즉, 입력값 하나당 하나의 클래스에만 대응될 수 있습니다. 이와 반대로 하나의 입력값이 여러 개의 클래스에 대응되는 경우 다중 레이블 분류(multi-label classification)이라고 합니다. 예를 들어 숫자는 0부터 9까지 총 10개가..

TISTORYTISTORY
Cross-Entropy와 Softmax의 미분
Cross-Entropy와 Softmax의 미분

Cross-Entropy와 Softmax의 미분

1. 개요 다중 분류를 위한 인공신경망을 빌드할 때 보통 마지막 레이어의 출력값에 Softmax를 직용시키고 실제 레이블값과 비교하여 Cross-Entropy Loss를 계산한다. Softmax를 통해 마지막 레이어의 출력값을 확률값으로 변환할 수 있고 Cross-E

TISTORYTISTORYCross Entropy Loss with Softmax 미분에 대한 이해
Cross Entropy Loss with Softmax 미분에 대한 이해

Cross Entropy Loss with Softmax 미분에 대한 이해

https://madalinabuzau.github.io/2016/11/29/gradient-descent-on-a-softmax-cross-entropy-cost-function.html Gradient descent on a Softmax cross-entropy cost function In this blog post, you will learn how to implement gradient descent on a linear classifier with a Softmax cross-entropy loss function. I recently had to implement this from scratch, during the CS231 course offered by Stanford on visua..

TISTORYTISTORY
=
소프트맥스 역전파
소프트맥스 역전파

소프트맥스 역전파

추가로 정리입력 : (z1, z2, z3)softmax 층 출력 : (y1, y2, y3)cross entropy 층 정답 레이블 : (t1, t2, t3)cross entropy 층 출력 : L (손실)Softmax 계층 : 입력값을 0~1사이의 값으로 정규화하여 출

 

[Multi-Class]

how
확률적으로 나타내기 위해서 softmax 함수를 덧붙인다.
이진 분류에서는 threshold(sigmoid) 함수를 붙여서 분류한다.
notion image
다중 분류에서는 softmax를 취해 확률 값으로 mapping 해준 후 one-hot encoding을 통해 label matching을 한 후 결과를 내준다. ⇒ sigmoid를 일반화한 형태라고 부르기도 하는 것 같다.
notion image
 

[Threshold and Loss func]

softmax and cross entropy gradient
소프트맥스와 크로스 엔트로피의 그래디언트를 어떻게 구할까?
⇒ 주로 두 함수를 합쳐서 그래디언트를 구하는 방식을 사용한다.
밑 링크를 사용해서 그래디언트를 구해 보았다.
소프트맥스 역전파
소프트맥스 역전파

소프트맥스 역전파

추가로 정리입력 : (z1, z2, z3)softmax 층 출력 : (y1, y2, y3)cross entropy 층 정답 레이블 : (t1, t2, t3)cross entropy 층 출력 : L (손실)Softmax 계층 : 입력값을 0~1사이의 값으로 정규화하여 출

 

[Main]