octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61762] qp should check positive definiteness


From: Julien Bect
Subject: [Octave-bug-tracker] [bug #61762] qp should check positive definiteness
Date: Tue, 27 Jun 2023 03:33:52 -0400 (EDT)

Follow-up Comment #8, bug #61762 (project octave):

[(Erreur - Introuvable)]
Re-opening this thread in relation with https://savannah.gnu.org/bugs/?64346.

I have looked at the source code of __qp__ and I am not convinced that the
algorithm is restricted to the case where H is positiv definite.  It seems to
handle positive semi-definite matrices as well.

I have tried to reproduce the problem in the first post (after commenting out
the test for positiv definiteness in qp.m of course):

% Objective: 1/2 x'*H*x + q'*x
H = [21, 30, 39; 30, 45, 60; 39, 60, 81];
q = [-40; -65; -90];

[x, fx, info, lambda] = qp ([], H, q)


This is a convex quadratic problem, where H is positive semi-definite, with
rank 2.  As a consequence, the objective function has a minimum, but the
minimizer is not unique.

Anyway, qp is able to find a solution, and no error is raised:

x =

  -1.4324
  -0.1352
   1.9010

fx = -52.500
info =

  scalar structure containing the fields:

    solveiter = 17
    info = 0

lambda = [](0x1)


Checking optimality:

>> max (abs (H*x + q))
ans = 3.7414e-10


I cannot reproduce the original error.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61762>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]