> >> If you get a NO from the sage devel, then you can try code here : >> https://gist.github.com/endolith/2837160 >> >> https://gist.github.com/endolith/2837160 >> >> The Weber point has other names : >> https://en.wikipedia.org/wiki/Geometric_median >> >> > Or Mediancentre (not center, apparently). R has a couple different > packages for doing this, and I use them myself when I need to compute this, > sending it back to Sage. >
It was requested that I be more explicit about this. See https://www.r-project.org/conferences/useR-2010/slides/Crisman.pdf though this was a fairly detailed thing. The packages in question are orloca and/or depth (the latter has a nice Fortran implementation). E.g. once the depth package is loaded Z = r.eval('med(matrix(c(%s),ncol=2),maxit=400,method="Spatial")'%str(exes+whys)[1:-1]) Z = Z.splitlines()[1].split() return (RR(Z[1]),RR(Z[2])) though this is VERY naive. The reason for r.eval() is because it was hard for me to get optional R arguments in, r.med(Z,method="Spatial") didn't seem to work. Sorry for not having time to be more specific - the point is that even I was able to figure out how to do it, so it must be doable! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
