text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
import numpy as np

import pandas as pd

import pandas as pd
data = pd.read_csv('/kaggle/input/docs-for-lsh/docs_for_lsh.csv')

import numpy as np
data = data.values[:, 1:]
np.random.seed(0)
n = 30
m = data.shape[0]
length = data.shape[1]
signMatrix = np.zeros((n, m))

for i in range(n):
    seq = np.arange(0, length)
    np.random.shuffle(seq)
    for j in range(m):
        for k in seq:
            if data[j][k] == 1:
                signMatrix[i][j] = k + 1
                break
signMatrix