[mlpack-git] [mlpack] Mean shift clustering (#388)

Shangtong Zhang notifications at github.com
Wed Feb 25 21:33:48 EST 2015


Thanks for your detailed guidance.
I agree that my optimization for kernel which uses squared distance is unnecessary. 
A smart compiler should do it.
But I have a question about the general formulation.
I think it should be
∇f(x) = ∑ K'(∥ x - x_i ∥) d/dx(∥ x - x_i ∥).
= ∑ K'(∥ x - x_i ∥) d/dx((∥ x - x_i ∥^2)^1/2)
= ∑ K'(∥ x - x_i ∥) (1/2 (∥ x - x_i ∥^2)^(-1/2)) 2 * (x - x_i)
= ∑ K'(∥ x - x_i ∥) (1 / (∥ x - x_i ∥)) (x - x_i)
My implementation for general case accords with this formulation. 
I am going to remove the unnecessary kernel traits UsesSquaredDistance.

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/388#issuecomment-76111686
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150225/35dfe8c1/attachment.html>


More information about the mlpack-git mailing list