Minimizing l2 Norm with gradient descent with multiple variables
이전 댓글 표시
Hello, im kind of new to matlab. I want to minimize my l2 error with gradient descent. The l2 error depends on two variables g,h which i want to initialize at 0.5 , 0.5. Can someone help me? How do i put my l2-error and steepest gradient descent together?
댓글 수: 1
Torsten
2022년 5월 19일
Differentiate the l2-error with respect to g and h.
Then -gradient(l2_error) will be the descent direction for the method of steepest descent.
As soon as the distance between two subsequent values X_i = (g_i,h_i) and X_(i+1) = (g_(i+1),h_(i+1)) coming from the formula
X_(i+1) = X_(i) - r*gradient(l2_error)
for a constant r>0 is less than a small number eps chosen by you, stop the algorithm.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!