From: Naga S. K. S. R. <sra...@gs...> - 2021-06-30 12:38:30
|
Hi Sara, Could you give some more information? Are there any pre-processing steps applied on the data? Mask might help if you are using volumes to avoid any background voxels in the data. Optionally you can try entering number of clusters in K-means rather than using optimal clusters to get the estimated clusters. Thanks, Srinivas ________________________________ From: Sara C <sar...@li...> Sent: Wednesday, June 30, 2021 12:15 AM To: ica...@li... <ica...@li...> Subject: Error during k-means clustering: problem with complex numbers Dear experts, I am trying to perform dFNC analysis and I am getting the following warning and error: Computing k-means on FNC correlations ... Optimization terminated: relative function value changing by less than OPTIONS.TolFun. Warning: Imaginary parts of complex X and/or Y arguments ignored > In icatb_optimal_clusters (line 249) In icatb_post_process_dfnc (line 405) In sara_run_dfnc (line 235) Warning: Imaginary parts of complex X and/or Y arguments ignored > In icatb_optimal_clusters (line 251) In icatb_post_process_dfnc (line 405) In sara_run_dfnc (line 235) Number of estimated clusters used in dFNC standard analysis is mean of all tests: 4+1i Error using repmat Complex replication factors are not supported. Error in icatb_kmeans Error in icatb_post_process_dfnc (line 428) [IDXp, Cp, SUMDp, Dp] = icatb_kmeans(SPflat, num_clusters, 'distance', dmethod, 'Replicates', kmeans_num_replicates, 'MaxIter', kmeans_max_iter, 'Display', 'iter', 'empty', 'drop'); Error in sara_run_dfnc (line 235) icatb_post_process_dfnc(fileN); I am using a script found in this thread https://sourceforge.net/p/icatb/discussion/309910/thread/32d6014253/ (the one called run_dfnc.m) with just a few edited parameters like the max number of iterations (300 instead of 150), the distance method (‘sqEuclidean’) and the estimation of the optimal number of clusters (using the elbow method). I am using this script because I am performing dFNC over VOIs instead of ICA components, so my understanding is that I cannot use the GUI or the standard batch scripts. (All VOIs were collated in a 4D array with dimensions subjects x sessions x volumes x ROIs). Seems to me that the warning and the error are connected (the variable SPflat is an array of complex doubles). Any idea of what is going wrong? Any help would be really appreciated. Many thanks in advance. Best wishes, Sara |