Skip to main content

Kmeans as mixed integer programming

Answered

Comments

3 comments

  • Official comment
    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.
  • Riley Clement
    • Gurobi Staff

    Hi Retsebile,

    for category in range(clusters):
      for data in range(n): # <- I think you're missing this line
            model.addQConstr(

    - Riley

    0
  • Retsebile Maphalla
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Riley, thanks for the response. I added the constraint but it was going to take days to find an optimal solution at the rate the solver was moving at

    0

Post is closed for comments.