Skip to main content

difference between Gurobi solution and Python Scipy nnls solution for non-negative least square problem

Comments

4 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Silke Horn
    Gurobi Staff Gurobi Staff

    Could you paste a full example with A and b? I just tried the small example from the scipy documentation and Gurobi gave me the same result as nnls.

    Moreover, I don't think you need to add the constraint since it simply says that the Euclidean norm of Ax-b should be non-negative (which should always be true by definition). What do you think?

    0
  • Gang Wu
    Gurobi-versary
    First Comment
    First Question

    Thank you for your response! My case is a non-convex optimization case.

    A sample coefficient is in the link

    https://drive.google.com/open?id=16v7_iQn3sVGumuIl9wsr0E3Nz3eC2SN3zUa_DBLW1Pg

    0
  • Gang Wu
    Gurobi-versary
    First Comment
    First Question

    I already set the solver to be 'nonconvex' by

    m.setParam("NonConvex", 2)

     

    0

Post is closed for comments.