Prescriptive Analytics in the Python Ecosystem with Gurobi [PyCon DE & PyData Berlin 2024]

Learn how Gurobi's Python ecosystem empowers prescriptive analytics, from supply chain to ML integration. Discover optimal decision-making beyond predictive forecasting.

Key takeaways
  • Gurobi is a commercial mathematical optimization solver that guarantees globally optimal solutions for complex business problems, unlike heuristic approaches

  • Key use cases include supply chain logistics, airline fleet scheduling, portfolio optimization, conference scheduling, and agricultural route planning

  • The tool works with three main components:

    • Decision variables (what you want to optimize)
    • Constraints (rules/limitations)
    • Objective function (what to maximize/minimize)
  • Free for academic and non-profit use, with commercial licenses available. Integrates with common Python data science tools like Pandas

  • Offers specialized packages:

    • Gurobi Optimodes (pre-built optimization models)
    • Gurobi Machine Learning (integrates trained regressors)
    • Gurobi Pi Pandas (data-driven optimization API)
  • Uses absolute value (L1 norm) instead of squared error (L2 norm) for more robust optimization against outliers

  • Handles complex constraints like binary/integer variables, inequalities, and trained ML model integration

  • Differentiates from predictive analytics by focusing on optimal decision-making rather than just forecasting

  • Solves problems through C-based implementation with specialized mathematical algorithms developed by R&D team

  • Can handle large-scale optimization problems that open-source solvers struggle with, offering better performance and reliability