Skip to content
Permalink
b1a05852fb
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
14 lines (12 sloc) 538 Bytes
import numpy as np
import pandas as pd
import interaction_distance as id
m = 141
s = 20
dims = 2
bin1 = np.random.uniform(-0.5, 0, (m, dims))
for i in range(1, s):
bin2 = np.concatenate((np.random.uniform(-0.5, 0, (m - i, dims)), np.random.uniform(0, 0.5, (i, dims))), axis=0)
print('s=' + str(i), id.compute_ID(pd.DataFrame(bin1), pd.DataFrame(bin2), [0.5 for d in range(dims)]))
bin3 = np.random.uniform(-0.5, 0, (m, dims))
print('bin1, bin3', id.compute_ID(pd.DataFrame(bin1), pd.DataFrame(bin3), [0.5 for d in range(dims)]))