일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- 백준
- pytorch #cuda #우분투 torch #ubuntu pytorch #cuda torch #cuda pytorch
- 깃허브 #우분투 #ubuntu #Github #깃허브 우분투 #깃헙 우분투 #깃헙
- 파이썬 #Python
- docker #아나콘다 #anaconda #ubuntu anaconda #docker anaconda
- GPU #cuda out of memory #gpu 메모리 #pytorch
- BERT #구글BERT #BERT의정석
- logistic regression
- cuda #centos #cuda삭제 #리눅스 #cenos cuda삭제
- 구름자연어처리과정
- 백준 #알고리즘 #골드
- 구름
- pandas #folium #groupby #네이버부스트코스 #코칭스터디
- 머신러닝
- docker #cuda #docker container #도커 #도커 컨테이너 #쿠다 #cuda 11.3
- docker #도커 #도커 컨테이너 #docker container #도커 우분투
- 알고리즘 #levenshtein distance #편집거리 #edit distance
- 트랜스포머 #자연어처리 #딥러닝 #구글 #attention #self-attention #BERT #transformer #deeplearing
- jupyter notebook #anaconda #vscode #pytorch #딥러닝 #deep learning #vscode server #서버 vscode #ssh vscode #vscode cuda
- ssh #우분투 ssh #우분터 서버 #도커 #우분투 도커 #docker #cuda #우분투 개발환경 #딥러닝 #ubuntu docker #ubuntu cuda
- docker #우분투 #ubuntu #도커 설치 #docker 설치 #docker installation #우분투 도커
- Machine Learning
- GPU #jtorch GPU #파이토치 병렬 #파이토치 GPU #pytorch gpu #multi process torch #horovod
- 트랜스포머 #transformer #attention #self-attention #어텐션 #인공지능 #AI #딥러닝 #NLP #자연어처리
- Today
- Total
바닥부터 시작하는 개발 공부
[구름_자연어처리 _4기]logistic regression 본문
logistic regression: 기존의 선형회귀처럼 값을 예측하는 것이 아니라
메일로 치면 spam/ non spam 같은 분류를 위해 사용

Threshold clssifiter output h_theta(x) at 0.5
if h_theta(x) >=0.5, predict y=1
if h_theta(x) <=0.5, predict y=0
Logistic Regression : 0 <= h_theta(x) <= 1
Binary clssfication(이진분류) : 0이나 1 두가지로 분류
스팸/일반메일 양성/음성 남자/여자 등등
Logistic Regression hypothesis
ax+b 라는 모델이 있을 때 range를 원하는 곳([0,1])으로 mapping시키기 위해서
sin같이 범위를 가지는 함수에 넣어줌 -> x가 아무리 작거나 커도 범위를 안넘어가게
h_theta(x) =g(z) ( z = dot( tran.theta , x) )
Sigmoid!

Input feature가 두개인경우 (혹은 이상)
h_theta(x) = g(theta_0 + theta_1 x_1 + theta_2 x_2) 같이 표현
linear decision boundaries
ex) Predict y = 1 if -3+ x_1 + x_2 >=0 -> 어떤 직선 선을 기준으로!

Non-linear decision boundaries

Cost function

h_theta 값이 0.51이 나온다고 가정해보자 (1이면 Class A 이고 0이면 Class B)
이 경우 Class A로 분류가 되겠지만 이걸 1까지 높히고 싶음


그러면 손실함수를 이렇게 쓸 수 있다. 위의 식의 if문을 제거하고 다시 쓰면 아래 식과 같다
Gradient Descent
Want min_theta J(theta)
Cost(a,b)의 a와 b에 대해서 편미분 계산!
'딥러닝 > NLP' 카테고리의 다른 글
[구름 자연어처리 8회차]AI 학습 가이드 from 멘토링 (0) | 2022.11.18 |
---|