Algorithm to find point of minimum total distance from locations

后端 未结 3 888
予麋鹿
予麋鹿 2020-12-13 15:16

I\'m building an application based around finding a \"convenient meeting point\" given a set of locations.

Currently I\'m defining \"convenient\" as \"minimising the

3条回答
  •  甜味超标
    2020-12-13 15:54

    One option is to define an objective (and gradient) function and use a generic optimization library, such as scipy.optimize. fmin_cg would be a good algorithm to try for your problem. Your objective would be the sum of distances as defined in the "Definition" section of the Geometric median Wikipedia page referenced by hatchet. The argument to your objective function is y.

提交回复
热议问题