![]() Shell_indices: 1D numpy array of shape (Ndata)Īrray of integers, starting from 0, representing to which shell a Maximum b-value distance for a measurement to be included in the same However, if bvalues were max max_distance was 1, then this Input as a limit of including measurements in the same cluster.įor example, if bvalues were and max_distance was 1, thenĪll bvalues would belong to the same cluster. It uses scipy's linkage clustering algorithm, which uses the max_distance # Plot the reconstruction error vs stabilities and select the optimum number of signature #ĭef calculate_shell_bvalues_and_indices(bvalues, max_distance=20e6):Ĭalculates which measurements belong to different acquisition shells. Y = hierarchy.fcluster(Z, threshold, criterion='distance', R=None, monocrit=None)ĭataframe = pd.DataFrame( # The indices of the datapoints will be displayed as the ids Plt.savefig(layer_directory+'/dendrogram.pdf',figsize=(10, 8), dpi=300) Plt.title("Clustering of Samples Based on Mutational Signatures" ) Z = hierarchy.linkage(data.T, 'single', 'cosine')ĭn = ndrogram(Z, labels = colnames, color_threshold=threshold) ![]() Def dendrogram(data, threshold, layer_directory):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |