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

gurobi+ML

回答済み

コメント

5件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • 崇林 潘
    • Gurobi-versary
    • Conversationalist
    • First Question

    Let me explain again. For example, I used scikit-learn to establish a prediction model. At the same time, I am now facing a multi-objective optimization problem. One of the goals is the smallest value of the prediction model to be established, and the other goal is to find a maximum value. How can I solve the established prediction model as one of the multi-objective problem target functions?

    0
  • Riley Clement
    • Gurobi Staff

    Hi,

    Check out the surrogate modelling example from the gurobi-machinelearning documentation:

    https://gurobi-machinelearning.readthedocs.io/en/stable/auto_examples/example1_2DPeakFunction.html#sphx-glr-auto-examples-example1-2dpeakfunction-py

    This example shows the result of a ML model being minimized. 

    Also see multiobj.py where we demonstrate the construction of a multi-objective model in Python.  We also have a relevant section in our reference manual: Working with Multiple Objectives.

    You can combine both approaches to achieve what you want.  For example, try replacing

    m.setObjective(y_approx, gp.GRB.MINIMIZE)

    in the surrogate modelling example with

    m.ModelSense = gp.GRB.MINIMIZE
    m.setObjectiveN(y_approx, index=0, priority=1)
    m.setObjectiveN(x.sum(), index=1, priority=0)

    - Riley

     

     

    0
  • 崇林 潘
    • Gurobi-versary
    • Conversationalist
    • First Question

    How to get Pareto Frontier in Gurobi for multiple goals, thanks

    0
  • Riley Clement
    • Gurobi Staff

    You will need to use the weight parameter in setObjectiveN, and use a blended objective (not hierarchical), i.e. set priority=0 for both objectives.

    By varying the relative weights of the objectives you can obtain solutions along the pareto frontier.

    - Riley

    0

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