Linear and Nonlinear Optimization

Similar documents
ECE 680 Modern Automatic Control. Gradient and Newton s Methods A Review

Optimization: Nonlinear Optimization without Constraints. Nonlinear Optimization without Constraints 1 / 23

Chapter 3 Numerical Methods

j=1 r 1 x 1 x n. r m r j (x) r j r j (x) r j (x). r j x k

Numerical solutions of nonlinear systems of equations

Non-linear least squares

Pose Tracking II! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 12! stanford.edu/class/ee267/!

Applied Mathematics 205. Unit I: Data Fitting. Lecturer: Dr. David Knezevic

Computational Methods. Least Squares Approximation/Optimization

Numerical computation II. Reprojection error Bundle adjustment Family of Newtonʼs methods Statistical background Maximum likelihood estimation

ECE580 Fall 2015 Solution to Midterm Exam 1 October 23, Please leave fractions as fractions, but simplify them, etc.

Regression with Numerical Optimization. Logistic

2 Nonlinear least squares algorithms

Numerical solution of Least Squares Problems 1/32

13. Nonlinear least squares

Optimization 2. CS5240 Theoretical Foundations in Multimedia. Leow Wee Kheng

1 Introduction. (1) i=1. χ 2 (p) = w i

Visual SLAM Tutorial: Bundle Adjustment

Least-Squares Fitting of Model Parameters to Experimental Data

Camera calibration. Outline. Pinhole camera. Camera projection models. Nonlinear least square methods A camera calibration tool

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey

CS 542G: Robustifying Newton, Constraints, Nonlinear Least Squares

Vasil Khalidov & Miles Hansard. C.M. Bishop s PRML: Chapter 5; Neural Networks

Generalization. A cat that once sat on a hot stove will never again sit on a hot stove or on a cold one either. Mark Twain

nonrobust estimation The n measurement vectors taken together give the vector X R N. The unknown parameter vector is P R M.

Lecture 7 Unconstrained nonlinear programming

Maximum Likelihood Estimation

4 Newton Method. Unconstrained Convex Optimization 21. H(x)p = f(x). Newton direction. Why? Recall second-order staylor series expansion:

Methods that avoid calculating the Hessian. Nonlinear Optimization; Steepest Descent, Quasi-Newton. Steepest Descent

17 Solution of Nonlinear Systems

ECE580 Exam 1 October 4, Please do not write on the back of the exam pages. Extra paper is available from the instructor.

14. Nonlinear equations

Outline. Scientific Computing: An Introductory Survey. Optimization. Optimization Problems. Examples: Optimization Problems

Lecture 10. Neural networks and optimization. Machine Learning and Data Mining November Nando de Freitas UBC. Nonlinear Supervised Learning

Sparse Levenberg-Marquardt algorithm.

1 Newton s Method. Suppose we want to solve: x R. At x = x, f (x) can be approximated by:

System Identification and Optimization Methods Based on Derivatives. Chapters 5 & 6 from Jang

EE482: Digital Signal Processing Applications

Non-polynomial Least-squares fitting

Advanced Techniques for Mobile Robotics Least Squares. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

Trust-region methods for rectangular systems of nonlinear equations

Generalized Gradient Descent Algorithms

Lecture Notes: Geometric Considerations in Unconstrained Optimization

NonlinearOptimization

3.4 Linear Least-Squares Filter

Nonlinear Least Squares Curve Fitting

Numerical Methods I Solving Nonlinear Equations

MOTION OF A POINT MASS IN A ROTATING DISC: A QUANTITATIVE ANALYSIS OF THE CORIOLIS AND CENTRIFUGAL FORCE

Chapter 4. Unconstrained optimization

Math 273a: Optimization Netwon s methods

Math 411 Preliminaries

6.252 NONLINEAR PROGRAMMING LECTURE 10 ALTERNATIVES TO GRADIENT PROJECTION LECTURE OUTLINE. Three Alternatives/Remedies for Gradient Projection

Variations on Backpropagation

A Sobolev trust-region method for numerical solution of the Ginz

Stable Adaptive Momentum for Rapid Online Learning in Nonlinear Systems

Matrix Derivatives and Descent Optimization Methods

Numerical Optimization

Optimization. Totally not complete this is...don't use it yet...

Contents. Preface. 1 Introduction Optimization view on mathematical models NLP models, black-box versus explicit expression 3

1. Nonlinear Equations. This lecture note excerpted parts from Michael Heath and Max Gunzburger. f(x) = 0

Generalized Newton-Type Method for Energy Formulations in Image Processing

Introduction to gradient descent

Numerical Optimization Algorithms

On Parameter Estimation for Neuron Models

Scientific Computing: An Introductory Survey

Theory of Bouguet s MatLab Camera Calibration Toolbox

Optimization Methods. Lecture 18: Optimality Conditions and. Gradient Methods. for Unconstrained Optimization

Unconstrained minimization of smooth functions

GLOBALLY CONVERGENT GAUSS-NEWTON METHODS

Least Squares Fitting of Data by Linear or Quadratic Structures

Neural networks III: The delta learning rule with semilinear activation function

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

MA/OR/ST 706: Nonlinear Programming Midterm Exam Instructor: Dr. Kartik Sivaramakrishnan INSTRUCTIONS

Levenberg-Marquardt Method for Solving the Inverse Heat Transfer Problems

Augmented Reality VU numerical optimization algorithms. Prof. Vincent Lepetit

Nonlinear Optimization for Optimal Control

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

Chapter 6: Derivative-Based. optimization 1

Linear and logistic regression

, b = 0. (2) 1 2 The eigenvectors of A corresponding to the eigenvalues λ 1 = 1, λ 2 = 3 are

Deep Learning. Authors: I. Goodfellow, Y. Bengio, A. Courville. Chapter 4: Numerical Computation. Lecture slides edited by C. Yim. C.

Numerisches Rechnen. (für Informatiker) M. Grepl P. Esser & G. Welper & L. Zhang. Institut für Geometrie und Praktische Mathematik RWTH Aachen

University of Houston, Department of Mathematics Numerical Analysis, Fall 2005

Worst-Case Complexity Guarantees and Nonconvex Smooth Optimization

ECE580 Partial Solution to Problem Set 3

INTRODUCTION ELECTROSTATIC POTENTIAL ENERGY. Introduction. Electrostatic potential energy. Electric potential. for a system of point charges

1. Method 1: bisection. The bisection methods starts from two points a 0 and b 0 such that

Math 409/509 (Spring 2011)

Gradient Descent. Dr. Xiaowei Huang

10. Unconstrained minimization


Suppose that the approximate solutions of Eq. (1) satisfy the condition (3). Then (1) if η = 0 in the algorithm Trust Region, then lim inf.

Non-Linear Finite Element Methods in Solid Mechanics Attilio Frangi, Politecnico di Milano, February 17, 2017, Lesson 5

MATHEMATICS FOR COMPUTER VISION WEEK 8 OPTIMISATION PART 2. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year

S(c)/ c = 2 J T r = 2v, (2)

Data Fitting and Uncertainty

Optimization. Escuela de Ingeniería Informática de Oviedo. (Dpto. de Matemáticas-UniOvi) Numerical Computation Optimization 1 / 30

Linear Models for Regression CS534

Solutions to Homework 5

Transcription:

Linear and Nonlinear Optimization German University in Cairo October 10, 2016

Outline Introduction Gradient descent method Gauss-Newton method Levenberg-Marquardt method Case study: Straight lines have to be straight

Introduction Optimization is used to compensate for this radially distorted image Figure: Image subjected to a radial distortion.

Introduction Figure: Image subjected to a radial distortion.

Introduction Figure: Image subjected to a radial distortion.

Introduction In fitting a function f (x) of an independent variables x to a set of data points f, it is convenient to minimize the sum of the weighted squares of the errors between the measured data (f ) and the curve-fit function ( f (x)) e 2 (x) = 1 2 ( m f f ) 2 (x) (1) w i i=1 = 1 2 (f f(x)) T W(f f(x)) (2) = 1 2 ft Wf f T W f(x) + 1 2 f T (x)w f(x), (3) where W is a diagonal weighting matrix with W ii = 1/w 2 i.

Introduction The function f is nonlinear in the model parameters x. Therefore, the minimization of e 2 with respect to the parameters (x) must be done iteratively. The goal of each iteration os to find a perturbation h to the parameter x that reduces e 2. We can use three methods, i.e., the gradient descent Method, the Gauss-Newton method and the Levenberg-Marquardt method.

Gradient Descent Method The steepest descent method is a general minimization method which updates parameter values in the direction opposite to the gradient of the objective function. The gradient of e 2 with respect to the parameters is e 2 (x) x = (f f(x)) T W x (f f(x)) (4) = (f f(x)) T W [ f(x) ] (5) x = (f f(x)) T WJ. (6) The perturbation h that moves the parameters in the direction of the steepest descent is given by h gd = αj T W(f f(x)), (7) where α is a positive scalar that determines the length of the step in the steepest descent direction.

Gauss-Newton method The Gauss-Newton method is a method of minimizing a sum-of-squares objective function. It presumes that the objective function is approximately quadratic in the parameters near the optimal solution. The function evaluated with perturbed model parameters may be locally approximated through a first-order Taylor series expansion. [ f(x) ] f(x + h) = f(x) + h (8) x = f(x) + Jh. (9) Substituting the approximation for the perturbed function in (1) yields e 2 (x+h) = 1 2 ft Wf+ 1 2 f T W f 1 2 ft W f (f f) T WJh+ 1 2 ht J T WJh, (10)

Gauss-Newton method The perturbation h that minimizes e 2 (x) is given from e2 (x) h = 0 h e2 (x + h) = (f f) T WJ + 1 2 ht J T WJ, (11) and the resulting normal equations for the Gauss-Newton perturbation are [J T WJ]h gn = J T W(f f(x)). (12)

Levenberg-Marquardt Method The Levenberg-Marquardt algorithm adaptively varies the parameter updates between the gradient descent and Gauss-Newton update, [J T WJ + λi]h lm = J T W(f f(x)), (13) where small values of the parameter λ result in a Gauss-Newton update and large values of λ result in a gradient descent update. [J T WJ + λdiag(j T WJ)]h lm = J T W(f f(x)). (14)

Levenberg-Marquardt Method Calculate the Jacobian matrix J If an iteration e 2 (x) e 2 (x + h) > h T (λh + J T W)(f f), then x + h is sufficiently better than x, reduce λ by a factor of ten. If an iteration e 2 (x) e 2 (x + h) < h T (λh + J T W)(f f), then x + h is sufficiently better than x, increase λ by a factor of ten. Convergence is achieved if max( J T W)(f f) ) < t. t denotes a threshold.

Levenberg-Marquardt Method The following functions can be used in fitting a set of measured data and finding the minimum of the function e 2 (x): f(x) = x1 exp( t/x 2 ) + x 3 sin(t/x 4 ) (15) f(x) = (x1 t x 2 1 + (1 x 1)t x 2 2 )1/x 2 (16) f(x) = x1 (t/ max(t))+x 2 (t/ max(t)) 2 +x 3 (t/ max(t)) 3 +x 4 (t/ max(t)) 4 (17)

Case study: Straight lines have to be straight Figure: Data are collected from a radially distorted image.

Case study: Straight lines have to be straight The lens distortion model can be written as an infinite series: x u = x d (1 + k 1 rd 2 + k 2rd 4 +...) (18) y u = y d (1 + k 1 rd 2 + k 2rd 4 +...),(19) where x u and y u are the undistorted coordinates, whereas x d and y d are the distorted coordinates. Further, k 1 and k 2 are the radial distortion parameters. The distorted radius (r d ) is given by Figure: Radial and r d = x 2d + y 2d. (20) tangential distortions.

Case study: Straight lines have to be straight The distortion error of each edge segment is given by e 2 = a sin 2 φ 2 b sin φ cos φ+c cos 2 φ (21) where 2 n a = xj 2 1 n x j (22) n b = c = j=1 j=1 n x j y j 1 n n j=1 n yj 2 1 n n j=1 j=1 j=1 x j j=1 y j n y j (23) 2. (24) Figure: The distortion error is the sum of squares of the distances from the degels to the least square fit line.

Case study: Straight lines have to be straight Figure: Data are collected from a radially distorted image after a edge detection.

Case study: Straight lines have to be straight Figure: Compensation of the radial distortion on the processed image.

Case study: Straight lines have to be straight Figure: Compensation of the radial distortion on the original image.

Thanks Questions please