Skip to main content

add_predictor_constr in Gurobi modeling




  • Official comment
    Pierre Bonami

    Hi Florencia,

    The issue is that there is no implementation for adding the logarithmic transformation in Gurobi ML. Since the transformation is applied to Gurobi variables in the model, one would need to implement a class that performs it.

    Then the error was not very graceful that I will fix.

    If you really want to use a logarithmic transformer you would need to implement a small class similar to the ones in

    I hope this helps. Best regards,


  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Florencia,

    I suspect this may be a bug in gurobi-machinelearning.

    I have created a Github Issue for it.

    - Riley



Please sign in to leave a comment.