mmd icon indicating copy to clipboard operation
mmd copied to clipboard

perhaps bug in the median trick

Open kayhan-batmanghelich opened this issue 8 years ago • 2 comments

Hi Dougal,

Maybe I am missing something but in the notebook example (and perhaps in other places), the median trick was not done correctly. In the median trick, sigma (inverse of gamma) should be set to median or quartile of distance. So, gamma should 1/median. In your code, it is another way around. If that is a bug, that affects the rescale option in rbf code.

Thanks,

kayhan-batmanghelich avatar Feb 23 '17 17:02 kayhan-batmanghelich

Hmm, you're right. It looks like it's just in the notebook, the code itself doesn't have any rescaling options. I'll fix and rerun the notebook tonight.

djsutherland avatar Feb 23 '17 18:02 djsutherland

Hi Dougal

I might be wrong but I think skl_group package might have rescaling wrong too. If rescale is True, it should divide distances by median not multiply. I think I also saw something along that line in the cython code in the mmd folder of mmd package as well. You might want to double check.

Thanks

Apologies for any spelling errors - sent from my 'smart' phone.

On Feb 23, 2017 1:02 PM, "Dougal J. Sutherland" [email protected] wrote:

Hmm, you're right. It looks like it's just in the notebook, the code itself doesn't have any rescaling options. I'll fix and rerun the notebook tonight.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dougalsutherland/mmd/issues/5#issuecomment-282070704, or mute the thread https://github.com/notifications/unsubscribe-auth/ALu03c1OMJdXZ_NIciwSksYv22KXSBvAks5rfcmRgaJpZM4MKSL_ .

kayhan-batmanghelich avatar Feb 23 '17 18:02 kayhan-batmanghelich