メインコンテンツへスキップ

Unexpected result when solving a SVM model (Quadratic Programming)

回答済み

コメント

6件のコメント

  • 正式なコメント
    Simranjit Kaur
    • 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?.
  • Jaromił Najman
    • Gurobi Staff

    Hi,

    You could use the Model.write() function to write an LP file and check whether the problem looks as you expect. You can write problem files from third party API by using the ResultFile parameter or as described in How do I write an MPS model file from a third-party API?

    Best regards,
    Jaromił

    0
  • Xiangyu Tian
    • Gurobi-versary
    • First Comment
    • First Question

    Hi,

    Thank you for the reply. But I have already tried this, the lp file looks perfect for me, still the answer is somehow very far from perfect. 

    Best,

    Xiangyu

     

     

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi,

    Did you write the LP files from both interfaces, i.e., from Gurobi's Python interface and from the CVXOPT interface? If you write out the two LP files and solve them using the command line tool, do you get the same results when setting ResultFile=solution.sol?

    Best regards,
    Jaromił

    0
  • Xiangyu Tian
    • Gurobi-versary
    • First Comment
    • First Question

    I only inspected LP file written by Gurobi. I don't know if it is possible to write the model with CVXOPT, I have searched for a while but haven't found anyway to do that yet. Do you know how to do this or any links for me to go see for myself? Thank you again.

    0
  • Jaromił Najman
    • Gurobi Staff

    You can write an MPS file as described in How do I write an MPS model file from a third-party API? You can then translate the MPS file to a human readable LP format using the write() function, or via

    gurobi_cl ResultFile=myModel.lp myModel.mps

    The parameter ResultFile makes Gurobi write the problem to an LP file after the optimization problem is done.

    0

投稿コメントは受け付けていません。