Skip to main content

Time taken to execute an embedded ML constraint

Ongoing

Comments

3 comments

  • Pierre Bonami
    Gurobi Staff Gurobi Staff

    Hi,

    Thanks for your interest in Gurobi ML. Sorry to hear that it is taking so long.

    We sometime had cases where generating the models for random forest or gradient boosting regressions would take some time but never this dramatic.

    Could you please share the size of the random forest model (number of estimators and the maximal size of the estimators) and the size of the \(\texttt{X_input}\) array?

    There are two optional parameters to \(\texttt{add_random_forest_regressor_constr}\) that may be of some help. With \(\texttt{verbose=True}\) you will at lest have some output during the construction of the models (if the model is large it will be a lot of output). With \(\texttt{no_debug=True}\), the package will skip giving name to variable for each estimator.

    Best regards and thanks for reporting your issue.

    0
  • Neha Neha
    First Comment
    Gurobi-versary
    First Question

    Hi Pierre,

    Thank you for responding. I can share the statistics for another instance that I ran which took 3hrs and 35 mins. It embeds a trained random forest regressor constraint into the OR model. The n_estimators is 1000 and max_features = 5. The X_input array shape is (11, 1321).

    I will try the two optional parameters in the add_random_forest_regressor_constr.

    Thanks!

    Neha.

    0
  • Neha Neha
    First Comment
    Gurobi-versary
    First Question

    Hi,

    Can someone help with this problem?

    Thank you!

    Neha.

    0

Please sign in to leave a comment.