tompollard / sammon

Sammon mapping in Python
32 stars 18 forks source link

added jupyter notebook and used updated sammon function #4

Open nsadawi opened 7 years ago

tompollard commented 6 years ago

Thanks for the pull request, and I think the addition of a Jupyter Notebook is a great idea. Before merging the Notebook, I think the following updates would be helpful for users:

Is it possible that you could look at these points?

nsadawi commented 6 years ago

Hi @tompollard .. yes I'll have a look Noureddin

nsadawi commented 6 years ago

Oki doki .. I've update the notebook import the sammon function from sammon.py Please observe I am still using the code updated by @Irene-GM as your code shows a value of NaN for E I also changed this line s_reshape = s.reshape(2,len(s)/2).T to s_reshape = s.reshape(2,len(s)//2).T to make sure integer division was done .. otherwise numpy complains

Just pushed my latest version

Best wishes, Noureddin

devernay commented 5 years ago

@nsadawi You shouldn't use the updated Sammon, because it doesn't do things right. Sammon should not be applied to cases where dissimilarity == 0 for some samples. Please check https://github.com/tompollard/sammon/pull/8 for an updated version (which fixes this and other bugs as well)