{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/7648","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/7648/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/7648/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/7648/events","html_url":"https://github.com/scipy/scipy/issues/7648","id":245066330,"number":7648,"title":"minimize_constrained interface","user":{"login":"antonior92","id":16557411,"avatar_url":"https://avatars0.githubusercontent.com/u/16557411?v=4","gravatar_id":"","url":"https://api.github.com/users/antonior92","html_url":"https://github.com/antonior92","followers_url":"https://api.github.com/users/antonior92/followers","following_url":"https://api.github.com/users/antonior92/following{/other_user}","gists_url":"https://api.github.com/users/antonior92/gists{/gist_id}","starred_url":"https://api.github.com/users/antonior92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonior92/subscriptions","organizations_url":"https://api.github.com/users/antonior92/orgs","repos_url":"https://api.github.com/users/antonior92/repos","events_url":"https://api.github.com/users/antonior92/events{/privacy}","received_events_url":"https://api.github.com/users/antonior92/received_events","type":"User","site_admin":false},"labels":[{"id":37340735,"url":"https://api.github.com/repos/scipy/scipy/labels/enhancement","name":"enhancement","color":"bfe5bf","default":true},{"id":37341011,"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.optimize","name":"scipy.optimize","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2017-07-24T12:37:33Z","updated_at":"2017-07-31T20:16:45Z","closed_at":null,"body":"Hi all!\r\n\r\nI am working on a constrained optimizer solver for my GSoC project. I started on a separate repository and I am working now on a pull request to integrate it to SciPy. In order to prooced we have to make the following decision: should we fit the constrained solver to the ``minimize`` interface or should we create a new one?\r\n\r\nThe best idea we came up with to try to fit the new solver into the ``minimize`` interface is to create a ``Constraints`` class and use it to pass the constraints specifications.\r\n\r\nI am, however, more and more conviced that the best option would be to create a new function ``minimized_constrained``. This new interface would be used to constrained minimization problems and I would include both SLSQP and COBLYA to it. The ``minimize`` interface would be reserved for unconstrained and bound-constrained problems.\r\n\r\n\r\nI think it would be better for the following reasons:\r\n\r\n1. The ``minimize`` interface would be kept simple and reserved for unconstrained problems and problems with simple bound constraints.\r\n2. We would have more freedom designing a ``minimize_constrained`` interface that best suit our needs.\r\n3. The burden of implementing and including SLSQP and COBLYA to a new interface is not much greater than the burden of fitting the constrained solver being implemented into minimize.\r\n4. This new interface could be used for new constrained solvers included to scipy.\r\n\r\nLet me elaborate on 1: I want to include finite-derivative options, quasi-newton options, different ways of passing constraints, different ways of passing second order information... All of that requires a great deal of documentation and the need of including several arguments to the function signature. And my point is: why to complicate ``minimize`` interface for something that will only be used by a single solver method?\r\n\r\nThe idea is to create a new interface so we keep ``minimize`` interface clean and easy to use. It would also give us more freedom for creating a better ``minimize_constrained`` interface.\r\n\r\nI would much appreciate any feedback on this.\r\n"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/319183790","html_url":"https://github.com/scipy/scipy/issues/7648#issuecomment-319183790","issue_url":"https://api.github.com/repos/scipy/scipy/issues/7648","id":319183790,"user":{"login":"antonior92","id":16557411,"avatar_url":"https://avatars0.githubusercontent.com/u/16557411?v=4","gravatar_id":"","url":"https://api.github.com/users/antonior92","html_url":"https://github.com/antonior92","followers_url":"https://api.github.com/users/antonior92/followers","following_url":"https://api.github.com/users/antonior92/following{/other_user}","gists_url":"https://api.github.com/users/antonior92/gists{/gist_id}","starred_url":"https://api.github.com/users/antonior92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonior92/subscriptions","organizations_url":"https://api.github.com/users/antonior92/orgs","repos_url":"https://api.github.com/users/antonior92/repos","events_url":"https://api.github.com/users/antonior92/events{/privacy}","received_events_url":"https://api.github.com/users/antonior92/received_events","type":"User","site_admin":false},"created_at":"2017-07-31T20:16:45Z","updated_at":"2017-07-31T20:16:45Z","body":"Hey Matt, thank you for the feedback! I will include a more detailed description on the actual \r\ndocumentation, this was more like a proof of concept.\r\n\r\nA few comments bellow:\r\n- I will specify all the shapes.\r\n- I like the idea of including a scalar broadcasting for ``lb``, ``ub`` and ``c``.\r\n- I will try to think a better name for ``constr_type``.\r\n- You are right:\r\n    hess(x, v) = sum(v[i]*H[:, :, i])\r\nI will try to provide a more detailed documentation about it. \r\n- When estimating ``hess(x, v)`` using finite differences, it will always return a linear operator:\r\n    hess(x, v) -> LinearOperator\r\nthat way there is no need to specify a sparse structure.\r\n- The estimation of \"2-point\" hessian evaluate the *Jacobian* in two points. I would not recommend this option unless the analytical value for computing the *Jacobian* is actually provided (quasi-Newton methods should be used in this case).\r\n\r\n\r\n"}}
{"actor":{"display_login":"antonior92"}}