import file_load 

import json
import os

import numpy

# file_load.make_data()

similarity = file_load.similarity()
correlation = file_load.correlation()

x=[]
y=[]

s="similarity, correlation\n"

for i in similarity:
	try:
		s+=str(i["similarity"])+','+str(correlation[i["from"],i["to"]])+'\n'
		x.append(i["similarity"])
		y.append(correlation[i["from"],i["to"]])
	except:
		pass

print(numpy.corrcoef(x,y)[0,1])

with open("Work/point.csv","w") as point:
	point.write(s)

