Skip to content

Commit

Permalink
added percentage of closer calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
DanBuchan committed Dec 17, 2024
1 parent 8e4adec commit 11d3a6c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/rep_distance_matrix/calculated_matrix_stats.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import numpy as np

with open('/home/dbuchan/Data/distance_mat/rand_rep_distance_matrix.npy', 'rb') as f:
dist_matrix = np.load(f)
dom_list = np.load(f)

num_cells = dist_matrix.shape[0] * dist_matrix.shape[1]
print(num_cells)
vals_less_than = (dist_matrix <= 0.91).sum()
print(vals_less_than)

percentage_of_close =(vals_less_than/num_cells)
print(percentage_of_close)

0 comments on commit 11d3a6c

Please sign in to comment.