Identification of Optimal Structural Connectivity Using Functional Connectivity and Neural Modeling

35 views
Skip to first unread message

Joey Gao

unread,
Apr 15, 2025, 5:24:38 AMApr 15
to TVB Users

Dear Developers,

I came across your paper in which you propose a method to enhance the fitting between the simulated functional connectivity (FCsim) and empirical functional connectivity (FCemp) by adding a small number of connections across the hemispheres. However, I was unable to find any code or demo related to this approach.

I have attempted to implement this on my own, but it seems there is something wrong with my implementation. Would you be able to help me correct it or provide information on where I can find a demo or code related to this method?

Thank you very much for your time and assistance. Below is the code I have written so far:

Best regards,

Joey


    ###get simulated_FC_new every iter, than

    updated_SC = SC_matrix.copy()  
   
    for i in range(n_regions):
        for j in range(i+1, n_regions):
            if abs(empirical_FC[i, j] - simulated_FC_new[i,j]) > tolerance:
                change_map[i,j] = 1
                change_map[j,i] = 1
                if empirical_FC[i, j] > 0:
                    updated_SC[i, j] = max_acter * empirical_FC[i, j]
                    updated_SC[j, i] = updated_SC[i, j]
                else:
                    if SC_matrix[i, j] != 0:
                        updated_SC[i, j] = min_acter
                        updated_SC[j, i] = updated_SC[i, j]
   
    SC_matrix = updated_SC.copy()
    plt.figure(figsize=(8,6))
    sns.heatmap(change_map, vmin=0, vmax=1, cmap='coolwarm', annot=False, cbar=True)
    plt.savefig("{}/opt_0.15_n/change_map{}.png".format(save_dir,iteration), dpi=300)
   
    tolerance = np.around(initial_tolerance * (1 - (iteration / (iterations-1))),3)
    tolerances_revieve.append(tolerance)
    print(f"Iteration {iteration}, Correlation: {new_correlation:.4f}, Tolerance: {tolerance:.4f}")

TVB Users

unread,
Jul 8, 2025, 11:44:47 AMJul 8
to TVB Users
hi,

Which paper are you referring to? Please share complete runnable code otherwise it is difficult to identify any issue. 

cheers,
Marmaduke
Message has been deleted

Joey Gao

unread,
Jul 10, 2025, 3:36:33 AMJul 10
to TVB Users
Triebkorn, Paul, Joelle Zimmermann, Leon Stefanovski, Dipanjan Roy, Ana Solodkin, Viktor Jirsa, Gustavo Deco, Michael Breakspear, Anthony Randal McIntosh, and Petra Ritter. 2020. “Identifying Optimal Working Points of Individual Virtual Brains: A Large-Scale Brain Network Modelling Study.” bioRxiv,bioRxiv. doi:10.1101/2020.03.26.009795.

The code I shared is the main logic of this paper. But it it maybe contains mistakes. I can't get the similar result as the paper I mentioned. Is any demo code for this paper to genelize the SCsim? Thanks very much.
Reply all
Reply to author
Forward
0 new messages