Skip to content

Commit

Permalink
Changed experiment 5 (exp5.py) to now consider covariance capped abov…
Browse files Browse the repository at this point in the history
…e 0 from below.
  • Loading branch information
Thomas Nowotny committed May 10, 2021
1 parent e02b3fa commit 8e8354e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/exp5.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
paras["lns_pns_g"]= 0
paras["lns_lns_g"]= 0
else:
paras["lns_pns_g"]*= 0.1*np.power(np.sqrt(10),ino)
paras["lns_lns_g"]*= 0.1*np.power(np.sqrt(10),ino)
paras["lns_pns_g"]*= np.power(np.sqrt(10),ino)
paras["lns_lns_g"]*= np.power(np.sqrt(10),ino)

# write results into a dir with current date in the name
timestr = time.strftime("%Y-%m-%d")
Expand Down Expand Up @@ -106,8 +106,8 @@
odors= np.load(paras["dirname"]+"/"+label+"_odors.npy")
oNo= odors.shape[0]

correl= np.corrcoef(odors,rowvar=False)
correl= correl/2.0+1.0
correl= np.cov(odors,rowvar=False)
correl= np.maximum(0.0, correl)
for i in range(paras["n_glo"]):
correl[i,i]= 0.0

Expand Down

0 comments on commit 8e8354e

Please sign in to comment.