일반적으로 함수의 최솟값을 찾는 데는 두 가지 접근 방법이 있다. 그리고 이 두 접근 방법의
절충안이 있다.
1
하나의 도함수만 계산하고 천천히 최솟값으로 수렴하는 방법이다(수렴 속도를 높이는 가속 방법도 있다).
이를 경사법
gradient
method
이라고 한다. 여기서 ‘경사’란 여러 변수에 대한 함수의 한 도함수다. 예를 들어 손
실 함수는 여러
w
(또는 하나의 벡터
w
v
)의 함수인 것처럼 말이다.
2
두 개의 도함수를 계산하여 좀 더 빠르게 최솟값으로 수렴하는 방법이다. 하지만 이 방법은 계산 비용이 훨
씬 더 많이 든다. 특히 수천 개의 파라미터가 있는 경우 큰 단점이 된다.
2
차 도함수를 정확히 계산하지 않
고 근사치로 구하면 계산 비용을 조금 절약할 수 있다.
2
차 미분법을 뉴턴의 방법
Newton
’
s
method
이라고 하며
헤시안
hessian
(
2
차 도함수의 행렬) 또는 헤시안의 근사 값이 사용된다.
2
차 도함수 이상을 계산할 필요는 없다.
그렇다면 최적값을 찾는 데
1
차 도함수와
2
차 도함수가 왜 이렇게 중요한 것일까?
1
차 도함수
는 함수가 어떤 지점에서 얼마나 빠르게 증가하거나 감소하는지에 대한 정보를 포함한다. 따라
서
1
차 도함수의 방향을 따라가면 최댓값으로 상승하거나 최솟값으로
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.