From: Naga S. K. S. R. <sra...@gs...> - 2021-06-30 17:59:41
|
Hi Sara, Toolbox saves out dfnc files in *results*mat. Check if the correlations (FNCdyn) are real or complex. isreal(FNCdyn) should return it as 1 and if it is 0 correlations are complex. You can try none instead of L1 correlation if correlations are complex. Thanks, Srinivas ________________________________ From: Sara C <sar...@li...> Sent: Wednesday, June 30, 2021 6:34 AM To: Naga Satya Kanaka Srinivas Rachakonda <sra...@gs...> Cc: ica...@li... <ica...@li...> Subject: Re: Error during k-means clustering: problem with complex numbers Dear Srinivas, Thanks for your reply. Yes, data preprocessing was applied using SPM12 and included the following steps: - Motion correction using rigid body transformations - Spatial normalisation (MNI-152 template space) - Smoothing with a 6-mm Gaussian kernel - Detrending (temporal linear trends removal) - Physiological noise corrections using RETROICOR (removal of respiratory and cardiac noise, WM and CSF) - High-pass (>0.008 Hz) and low-pass (<0.1 Hz) temporal filtering The VOIs were extracted using binarized ROI masks in conjunction with the individual binarized whole-brain masks, precisely to avoid the inclusion of non-brain voxels. Let me know if any of this could cause issues, in the mean time I will try again specifying the number of clusters directly instead of estimating it, as you suggested. Best wishes, Sara From: Naga Satya Kanaka Srinivas Rachakonda <sra...@gs...> Date: Wednesday, 30 June 2021 at 14:22 To: Sara C <sar...@li...> Cc: icatb-discuss <ica...@li...> Subject: Re: Error during k-means clustering: problem with complex numbers 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/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Ficatb%2Fdiscussion%2F309910%2Fthread%2F32d6014253%2F&data=04%7C01%7Csrachakonda%40gsu.edu%7C20a4751a79af491bb49308d93bc363e9%7C515ad73d8d5e4169895c9789dc742a70%7C0%7C0%7C637606532653561925%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Jj%2ByqFu7oU9BClxo5qN0D9ZP%2BTcGSsZWtvMFF8U8wbo%3D&reserved=0> (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 CAUTION: This email was sent from someone outside of the university. Do not click links or open attachments unless you recognize the sender and know the content is safe. |