优化了计算时间
r对于i,j和j,i只计算一次
This commit is contained in:
parent
aa956261b8
commit
53b5c63c86
12
file_load.py
12
file_load.py
@ -81,9 +81,13 @@ def corelation():
|
|||||||
que={}
|
que={}
|
||||||
for i in data:
|
for i in data:
|
||||||
for j in data:
|
for j in data:
|
||||||
try:
|
if i!=j:
|
||||||
que[i,j]=data[i].corr(data[j])
|
try:
|
||||||
except:
|
que[i,j]=data[i].corr(data[j])
|
||||||
pass
|
que[j,i]=que[i,j]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
break
|
||||||
return que
|
return que
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user