text_html_output_1.png
from sklearn.metrics.pairwise import pairwise_distances

from sklearn.metrics.pairwise import pairwise_distances

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df_sd = pd.read_csv('/kaggle/input/hacker-earth-love-in-the-screens/sample dataset.csv')
df_sd

df_sub = pd.read_csv('/kaggle/input/hacker-earth-love-in-the-screens/sample submission.csv')
df_sub

df_data = pd.read_csv('/kaggle/input/hacker-earth-love-in-the-screens/data.csv')
df_data

df_data.corr()

df_data.columns

df_data.other_interests.unique()

df = df_data
df_uid = df[['user_id']]

df.columns

df.T.corr()

df1 = df.T
df1

from sklearn.metrics.pairwise import pairwise_distances
jac_sim = 1 - pairwise_distances(df1.T, metric='hamming')
jac_sim = pd.DataFrame(jac_sim, index=df1.columns, columns=df1.columns)
jac_sim

from sklearn.metrics.pairwise import pairwise_distances
jac_sim = 1 - pairwise_distances(df1.T, metric='euclidean')
jac_sim = pd.DataFrame(jac_sim, index=df1.columns, columns=df1.columns)
jac_sim