Skip to content

Commit

Permalink
fix: print num proteins and list in each clust #57
Browse files Browse the repository at this point in the history
  • Loading branch information
jyaacoub committed Dec 8, 2023
1 parent 648dc80 commit ac971ed
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
# %% get subgroup mse

def get_cluster_details(clust):
print(clust)
# get subgroups
subgroups = {}
for prot in clust:
Expand Down Expand Up @@ -138,29 +139,27 @@ def get_cluster_details(clust):
print('WORST PERFORMERS')
for k in data_clust.keys():
if np.mean(data_clust[k]) > 0.5:
print(f'\n\n### Cluster {k} has {len(data_clust[k])} proteins and mean mse of {np.mean(data_clust[k]):.3f} '
f'with std {np.std(data_clust[k]):.3f}')
clust = list(clusters[k])
print(f'\n\n### Cluster {k} has {len(clust)} proteins and mean mse of {np.mean(data_clust[k]):.3f} '
f'with std {np.std(data_clust[k]):.3f}')
get_cluster_details(clust)



# print best performers
print('')
print('#'*50)
print('BEST PERFORMERS')
for k in data_clust.keys():
if np.mean(data_clust[k]) < 0.15:
print(f'\n\n### Cluster {k} has {len(data_clust[k])} proteins and mean mse of {np.mean(data_clust[k]):.3f} '
f'with std {np.std(data_clust[k]):.3f}')
clust = list(clusters[k])
print(f'\n\n### Cluster {k} has {len(clust)} proteins and mean mse of {np.mean(data_clust[k]):.3f} '
f'with std {np.std(data_clust[k]):.3f}')
get_cluster_details(clust)

# %% Cluster 43 is an outlier with the worse performance:

exit()


#--------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
#--------------------------------------------------------------------------------
# %% plot mse vs protein sequence length
Expand Down

0 comments on commit ac971ed

Please sign in to comment.