fmcquillan99 commented on issue #427: KNN: Add distances to the output table URL: https://github.com/apache/madlib/pull/427#issuecomment-520635936 Suggest we don't take a straight ABS() of the distance function. A negative distance is an error. But we need to protect against a 0 distance that the computer makes a small negative number. Hence: I suggest: ``` if dist < -epsilon error ("dist must be pos") else if dist < 0 dist=0 end if ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
