Skip to content

Basic Python implementation of the barrier method to solve a Quadratic optimization Problem.

License

Notifications You must be signed in to change notification settings

fournierlouis/barrier_method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

The barrier method (for Quadratic optimization problem) in Python

Basic Python implementation of the barrier method to solve a Quadratic optimization Problem.

Implemented for the course "Convex optimization and applications in machine learning" for Master MVA.

We consider the (QP) problem: minimize + subject to With and where .

The function v_seq = centering_step(Q,p,A,b,t,v0,eps) implements the Newton method to solve the centering step given the inputs (Q, p, A, b), the barrier method parameter t, initial variable and a target precision \epsilon The function outputs the sequence of variables iterates , where \epsilon is the number of iterations to obtain the \epsilon precision, using a backtracking line search.

The function v_seq = barr_method(Q,p,A,b,v0,eps) which implements the barrier method to solve (QP) using precedent function given the data inputs (Q, p, A, b), a feasible point v0, a precision criterion \epsilon. The function outputs the sequence of variables iterates , where \epsilon is the number of iterations to obtain the \epsilon precision.

We test our function on randomly generated matrices X and observations y with λ = 10. We plot precision criterion and gap * in semilog scale (using the best value found for \epsilon as a surrogate for *). We repeat for different values of the barrier method parameter µ = 2, 15, 50, 100,... and check the impact on w.

About

Basic Python implementation of the barrier method to solve a Quadratic optimization Problem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages