Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enquiring about missing step in TSNE analysis #1

Open
yipy0005 opened this issue May 3, 2024 · 0 comments
Open

Enquiring about missing step in TSNE analysis #1

yipy0005 opened this issue May 3, 2024 · 0 comments

Comments

@yipy0005
Copy link

yipy0005 commented May 3, 2024

Hi!

I was looking at the HDBSCAN_Chemoinfo.ipynb in the chemicalspace2 folder and I saw these 2 blocks of code:

import numba

@numba.njit()
def tanimoto_dist(a,b):
    dotprod = np.dot(a,b)
    tc = dotprod / (np.sum(a) + np.sum(b) - dotprod)
    return 1.0-tc`

tsne = TSNE(n_components=2, metric=tanimoto_dist)
tsne_X = tsne.fit_transform(X)
print(tsne_X.shape)

I would like to ask if we actually can set the function as the metric or is there an intermediate step to generate the tanimoto distances to be used as the metric?

Thank you!

Best,
Yew Mun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant